Imamate is in the Holy Quran and it is specified to be the divine administration of Allah:
وَ جَعَلْناهُمْ أَئِمَّةً يَهْدُونَ بِأَمْرِنا وَ أَوْحَيْنا إِلَيْهِمْ فِعْلَ الْخَيْراتِ وَ إِقامَ الصَّلاةِ وَ إِيتاءَ الزَّكاةِ وَ كانُوا لَنا عابِدِينَ
Moreover, there Hadith in both Sunni and Shia books that point to the fact that Rasul (sawa) said he would be succeeded by 12 Imams.
There are many more proofs of this, both from the Quran (21:73, 32:24, 2:124) and other sources