The reason for this belief is Imams are thought to be successors of prophet, and as such, they inherit the Prophet's divine knowledge.
This is understood from this verse of the Quran which explains that successors inherit from each other but the inheritance is not property, but knowledge. [27:16] says:
وَوَرِثَ سُلَيْمَانُ دَاوُودَ ۖ وَقَالَ يَا أَيُّهَا النَّاسُ
عُلِّمْنَا مَنطِقَ الطَّيْرِ وَأُوتِينَا مِن كُلِّ شَيْءٍ ۖ إِنَّ
هَـٰذَا لَهُوَ
الْفَضْلُ الْمُبِينُ
And Solomon inherited David. He said, "O people, we have been taught
the language of birds, and we have been given from all things. Indeed,
this is evident bounty."
The messenger of Allah was definitely the last Prophet. So Imams are not prophets since they do not bring any new message or religion. Imams are Caliph and assume the leadership of the Ummah and dispute settlements and conflicts among Muslims. Quran [4:59] says:
يَا أَيُّهَا الَّذِينَ آمَنُوا أَطِيعُوا اللَّـهَ وَأَطِيعُوا
الرَّسُولَ وَأُولِي الْأَمْرِ مِنكُمْ ۖ فَإِن تَنَازَعْتُمْ فِي شَيْءٍ
فَرُدُّوهُ إِلَى اللَّـهِ وَالرَّسُولِ إِن كُنتُمْ تُؤْمِنُونَ
بِاللَّـهِ وَالْيَوْمِ الْآخِرِ ۚ ذَٰلِكَ خَيْرٌ وَأَحْسَنُ تَأْوِيلًا
O you who have believed, obey Allah and obey the Messenger and Ulel'amr (those with authority) among you. And if you disagree over anything, refer it to
Allah and the Messenger, if you should believe in Allah and the Last
Day. That is the best [way] and best in result.
Quran orders to OBEY:
1- Allah 2- prophet 3- Ulel'Amr
As for the full implication of this verse, the Shia argues that Ulel'Amr must be infallible otherwise God would have not ordered Muslims to obey them because if they are fallible they can lead Muslims to mislead and sin. And this is not wise for God to order Muslims to do things that can lead to mislead and sin.
Now as for identity of the Ulel'Amr, since we know that Abubakr, Umar, Uthman, Muaviyeh and Yazid committed many mistakes and sometimes blatant sins none of them were infallible and therefore no qualify as Ulel'Amr.
Shias also believe that the guidance comes only from Allah, following the message of His Messenger (Sallahu alayhi wassalam), Ulelamr. Infallibility in religion is exclusive to the Prophet and Ulelamr, hence the Qur’anic injunction to obey them.
"Is there any Qur'anic ayah or Hadiths that prove the same?"
Yes there are many verses and hadiths for proving infallibility and leadership of 12 Imams of Shia.
The basis for Imamate is in Quran, in more than 100 verses. However these references are not explicit. The reason for implicitness is that since political positions are subject of envy for ill-intended people, had Allah been explicit about Imamate and the identity of the Imams, the villains with lust of power would have destroyed the Holy Quran to remove the challenge to their legitimacy. God made Imamate implicit so that Quran survive alteration and corruption by ill-intended Muslims.
Quran [5:67] says:
One of these implicit Qur’anic references to the institution and identity of Imams is the following
يَا أَيُّهَا الرَّسُولُ بَلِّغْ مَا أُنزِلَ إِلَيْكَ مِن رَّبِّكَ ۖ
وَإِن لَّمْ تَفْعَلْ فَمَا بَلَّغْتَ رِسَالَتَهُ ۚ وَاللَّـهُ
يَعْصِمُكَ مِنَ النَّاسِ ۗ إِنَّ اللَّـهَ لَا يَهْدِي الْقَوْمَ
الْكَافِرِينَ
O Messenger, announce that which has been
revealed to you from your Lord, and if you do not, then you have not
conveyed His message. And Allah will protect you from the people.
Indeed, Allah does not guide the disbelieving people.
According Islamic history and a multitude of Hadiths, the subject of Divine decree to the Holy Prophet in this verse is announcement of Ali ibn Abi Talib as his heir and successor at the event of Gadir Khum. The decree was announced by Prophet in front of 120,000 Muslims in a sermon after his last pilgrimage to Mecca.
http://www.al-islam.org/ghadir/
This verse (and the one that follows) also indicate(s) that the Prophet had misgivings and fear about announcing the Divine decree but he was relieved by Allah that he would be protected against the disbelievers who would have not been content with the appointment of Ali.
After the decree was announced at Ghadir the following verse (5:3) was revealed:
...الْيَوْمَ أَكْمَلْتُ لَكُمْ دِينَكُمْ وَأَتْمَمْتُ عَلَيْكُمْ نِعْمَتِي وَرَضِيتُ لَكُمُ الْإِسْلَامَ دِينًا ۚ فَمَنِ اضْطُرَّ فِي مَخْمَصَةٍ غَيْرَ مُتَجَانِفٍ لِّإِثْمٍ ۙ فَإِنَّ اللَّـهَ غَفُورٌ رَّحِيمٌ
This day those who disbelieve have despaired of [defeating] your religion; so fear them not, but fear Me. This day I have
perfected for you your religion and completed My favor upon you and
have approved for you Islam as religion. But whoever is forced by
severe hunger with no inclination to sin - then indeed, Allah is
Forgiving and Merciful.
Therefore it was with this vital announcement of the Imamate and Caliphate of Ali ibn abi Talib that the religion was brought to perfection, hence the reason for Imamate being an integral pillar of Islam.
Now with the above observations, the implications of other relevant verses are illuminated.
In Quran [4:59] we read:
يَا أَيُّهَا الَّذِينَ آمَنُوا أَطِيعُوا اللَّـهَ وَأَطِيعُوا
الرَّسُولَ وَأُولِي الْأَمْرِ مِنكُمْ...
O you who have believed, obey Allah and obey the Messenger and
Ulel'Amr among you.
With the above observations, ulel 'Amr are identified with the appointed Imam(s). Imams can also be identified with their full knowledge of everything. They never say "I do not know" in response to any question.
There are other Qur’anic references to the identity of Imams. In Quran [5:55] we read:
إِنَّمَا وَلِيُّكُمُ اللَّـهُ وَرَسُولُهُ وَالَّذِينَ آمَنُوا
الَّذِينَ يُقِيمُونَ الصَّلَاةَ وَيُؤْتُونَ الزَّكَاةَ وَهُمْ
رَاكِعُونَ
Your Mater is none but Allah and [therefore] His Messenger and those
who have believed - those who establish prayer and give zakah, while they are bowing [in worship].
According to history and Hadiths, this verse refers to Ali ibn abi Talib when he paid charity to a beggar while was in bow (sa). There are multitude of hadiths that all support this idea. Highlighting the significance of this verse, Umar is narrated as saying that he wished he could pay all his wealth so that this verse would have been revealed about him.
There are also hadiths wherein the prophet cited the identity of all those who would assume the office of Imamate by their names, signs and even physical shapes.
Another Qur’anic clue in reference to Imamate is found in this verse:
فَاسْأَلُوا أَهْلَ الذِّكْرِ إِن كُنتُمْ لَا تَعْلَمُونَ [en.sahih]
... so ask the people of the message if you do not know. [21:7]
"Ahl Zikr" have to be infallible knowledge, so that they can enlighten others about whatever they may ask them as enjoined by this verse.
So as explained earlier one way sign of Imams or rightful caliphs is that they are never caught not knowing things they are asked about.
Indeed, according to history, Abubakr, Umar and Uthman always asked their questions from Ali (sa) and used Ali S.A as their consultant in their government and wars (but Ali S.A himself never participated in their wars despite having been a key figure and a valorous warrior in all prophet's who never escaped any battle unlike some Sahaba who later assumed power after the death of the Holy Prophet.
Shias also used this method to identify the Imams. For example a Shia asked how much money he had right then in his pocket and the Imam answered him accurately and even mentioned where he had earned the money from. Imams also always knew the due amount and source of Zakat that would be brought by them by their followers before being told about it.
Another sign is they are capable of doing miracles. It is famous in both Shia and Sunni books Ali (S.A.) performed many miracles. Only one out of thousands of examples mentioned in both Shia and Sunni Hadith Books is that Ali S.A. went for funeral of Salman Farsi S.A in a distant city and came back in a moment!
Above verses were only few of many verses about Imamate. For more details you can refer to some books like: Leadership in Islam and Then I was guided, Real Ahl Sunnah, Peshavar Nights and other sources found in Al-Islam Digital Library