"Wala of Imamate" signifies religious authority, i.e. a position which makes the Imam a model for others who have to follow him and take instructions from him. Such a position automatically implies the infallibility of the Imam. It is the same position about which the Holy Qur'an, while referring to the Holy Prophet, says
"The Messenger of Allah is certainly a good example for those of you who have hope in Allah and believe in the Last Day and remember Allah very often". (al-Ahzab, 33: 21)
"Say: If you love Allah, follow me; Allah will love you and forgive you your sins". (Ale Imran, 3: 31)
These verses of the Holy Qur'an put forward the Holy Prophet as a model for others who are required to mould their conduct according to his and to follow in his footsteps. This in itself is a proof of his infallibility, because if he were liable to commit mistakes and sins Allah would not have introduced him as the leader and the guide.
After the Holy Prophet the Ahl al-Bayt succeeded to this position. There is a hadith quoted on the authority of about 30 companions of the Holy Prophet by most of the Sunni scholars in their books of hadith, history and biography of the Prophet. According to it the Holy Prophet has said "I am leaving behind among you two authorities, the Book of Allah and my Ahl al-Bayt. They shall not be separated from each other till they arrive at the Fountain of Kauthar. If you go ahead of them or fall short of expectations, you shall be misled. Do not try to teach them, for they know better than you''. 
Here the Holy Prophet has associated the Ahl al-Bayt with the Book of Allah as its co-equal. In respect of His Book, Allah says
"Falsehood cannot come at it from any direction". (Ham-mim, 41: 42)
If falsehood could come at the Ahl al-Bayt, how could they be its co-equal? Similarly if they had not been infallible like the Holy Prophet, they could not succeed him as the leaders of the ummah. The contents of the hadith show that it could apply only to certain infallible persons. As Nasiruddin Tusi has pointed out, no one except the Ahl al-Bayt is infallible, nor does anybody claim infallibility for anyone else. Hence the hadith can apply only to the Holy Imams (of the Shi'ah).
Ibn Hajar 'Asqalani says: "The Holy Prophet has told the people that they would be misled if they go ahead of the Ahl al-Bayt or fail to follow them. He has also said that they know better than others. This saying of the Holy Prophet proves that the Ahl al-Bayt, who reached the highest level of knowledge and were worthy of religious leadership, were superior to others. 
Hafiz Abu Na'im reports on the authority of Ibn Abbas that the Holy Prophet said "Whoever desires to live like me and to die like me should select Ali after me as his Waly and should follow the Imams of my family who have been endowed with knowledge and intelligence. Unlucky are those who deny their excellence and disregard my kinship to them. Such people shall be deprived of my intercession on their behalf".
That kind of religious leadership which makes every word and action of the leader authoritative is called Imamate. It is a sort of walayat in the sense that it implies a sort of control over the affairs of the people.
Every teacher and every guardian, as a rule, exercises some control over those who are under his tutelage. Naturally the teacher appointed by Allah should have a greater control.
"Your Waly can be only Allah, His Messenger and those who believe, tbose who are steadfast in prayers and pay zakat while they are bowing". (al-Mai'dah, 5 55)
envisages this kind of Walayat. This does not mean that this verse does not imply some other kinds of Walayat which we propose to mention later. What we intend to point out is that this verse speaks of Imamate and religious leadership and authority. In a number of the sayings of the Holy Prophet also the word "Waly" has been used for an Imam.
This kind of Wala when used with reference to an Imam means religious authority and the right of leadership, and when used with reference to the Muslims means the acknowledgement of this right.
 Al-Sawaiq al-Mohriqah by Ibn Hajar al-Shafi'i pp. 148 and 226 printed at Al-Muhammadiah Press, pp. 89 and 126 printed at Al-Maimaniah Press, Majma al-Zawa'id Vol. 9 p. 163 printed in Beirut. Yanabi al-Mawaddah by Qandozy al-Hanafi pp. 41 and 335 printed at Al-Hayderiah Press, pp. 37 and 296 printed in Istanbul. Al-Dur al-Manthur by Suyuti Vol. 2 p. 60 printed in Egypt, Al-Ghadir by Allama Amini Vol.1 p.34, Vol.3 p.80 printed in Beirut. Kanz al-Ummal by Alauddin Hindi Vol. 1 p. 168 hadith serial No.958 second edition, printed in Hyderabad.
 Al-Sawaiq al-Mohriqah.
 Hulyatul 'Ulya, Vol. 1, p. 86.