What this hadith is conveying is completely correct because its meaning is mutawatir, meaning that a very high number of hadiths disclose the same meaning and confirm it, such that one becomes sure that the Prophet has said something with the same meaning even though it isn’t necessarily clear what phrases and sentences he has used. However, in this hadith, kufr doesn’t mean the opposite of Islam, it means the opposite of iman (faith). It is very clear that this type of kufr does not have the same Islamic rulings (such as nijasah, etc.) as the previous. (For example, someone who isn’t Muslim, is najis. On the other hand, one who is Muslim but doesn’t possess iman, isn’t najis, nevertheless, according to this hadith, he is a kafir and nonbeliever.)
Of course, one should note that disobeying Imam Ali (a.s.) is considered kufr because Ali’s order is Allah’s order, and as a result disobeying him is equal to disobeying Allah (s.w.t.). This is how high the rank of imamah is.
This hadith that Imam Sadiq (a.s.) has narrated from the Holy Prophet (p.b.u.h.) (that says that obeying Ali (a.s.) is humility and modesty and disobeying him is kufr), has been cited in many different hadith references, but it seems that its main source, is Osool Al-Kafi of Kulaini.
This question is a bit vague. It isn’t very clear if the question is asking about the hadith’s sanad (chain of narrators) or about the hadith’s meaning and the message it is conveying. Therefore, we will analyze both aspects.
This hadith’s sanad (chain of narrators), as with Allamah Majlesi, is a tha’if one (meaning that all of its narrators aren’t reliable), although some have considered it mowathaq (a hadith that doesn’t have any problems sanadwise and can be relied on). The reason behind this is that two of the narrators in its sanad are Sahl-ibn-Ziyad Al-Adami and Yahya-ibn-Mobarak. Sahl is a controversial narrator; some have considered him tha’if (unreliable), while others thiqah (reliable), to the point that Sheikh Tusi has counted him thiqah in his rijal book, while counting him tha’if in his other book,
Al-Fihrist. Others such as Najashi, Kashi, and Ibn-Ghaza’eri, also know him as tha’if. As for Yahya, not much is known about him other than the fact that on one hand in Tafsir-al-Qummi some hadiths that he has narrated have been mentioned there, and on the other hand Qummi himself says in the introduction of his tafsir book that all of the hadiths in his book have been narrated from highly dependable and thiqah narrators (meaning that Yahya is highly dependable). Nevertheless, because of certain reasons, a good number of the ulema doubt all of the narrators mentioned in this book being thiqah.
The real question is that although this hadith is tha’if sanadwise, can one say that its content is correct? The answer to this question is that its content is almost mutawatir and has been emphasized on in many different hadiths.
In his book, “Muntaha”, Allamah Hilli says:
“Imamah which originally means recognizing, accepting, and obeying the imam (of one’s time), is one of the pillars of Islam and denying the imamah of Imam Ali (a.s.) is kufr.”
Of course, kufr here means the opposite of iman (faith and belief), not the opposite of Islam, and these two differ from each other. According to Islamic traditions and great scholars and ulema, Islam has a vaster meaning than iman and consequently, kufr meaning the opposite of iman is broader than kufr meaning the opposite of Islam and the two broader ones (Islam and kufr meaning the opposite of iman) cover more individuals. In other words, one can be Muslim and at the same time not accept the religious authority and imamah of Imam Ali (a.s.). It is clear that kufr meaning the opposite of iman doesn’t have the same practical rulings as normal kafirs such as external nijasah etc.
This is the reason behind why Koleini in his book, Osool-al-Kafi, has a chapter named “The Variance of Islam and Iman”. The first hadith of this chapter says that the prohibition of shedding blood and allowance of getting married with, all depend on Islam (meaning that shedding the blood of a Muslim is forbidden and getting married with a Muslim is permissible making no difference if the Muslim possesses iman in addition to Islam or not). In another hadith, Imam Baqir (a.s.) says: “Whosoever disobeys Amir-ul-Mo’mineen (a.s.) for any reason other than purposely and because of enmity towards him, hasn’t become kafir and hasn’t turned away from Islam.”
Concerning why the Prophet (p.b.u.h.) has said: “Disobeying Ali (a.s.) is kufr and the disbelief of Allah (s.w.t.).”, one must say that the Prophet (p.b.u.h.) has answered this question in the rest of the hadith; the Prophet (p.b.u.h.) goes on to say: “Ali (a.s.) guides you to the truth and right path.” The belief/disbelief of Allah (s.w.t.) depends on accepting/rejecting the truth and has nothing to do with Imam Ali (a.s.) himself, but since Ali’s (a.s.) words and actions completely and totally comply with the truth (as the Prophet (p.b.u.h.) has stressed on many times e.g. “The truth is with Ali (a.s.) wherever he goes.”) disobeying him means turning away from the truth, and turning away from the truth means turning away from Allah and kufr. This is all because of the importance and highness of the rank of imamah which is a divine rank granted by Allah (s.w.t.) and a position like that of the Prophet’s (p.b.u.h.) (which makes obeying and accepting from him a must and religious obligation) as the Prophet has said in the mutawatir hadith (a hadith narrated so many times by numerous narrators causing one to be absolutely sure that the hadith is genuine) of Ghadir: “من کنت مولاه فعلی مولاه” (Whosoever I am his mowla and master, Ali is his master.)
 سَهْلٌ عَنْ یَحْیَى بْنِ الْمُبَارَکِ عَنْ عَبْدِ اللَّهِ بْنِ جَبَلَةَ عَنْ إِسْحَاقَ بْنِ عَمَّارٍ وَ ابْنِ سِنَانٍ وَ سَمَاعَةَ عَنْ أَبِی بَصِیرٍ عَنْ أَبِی عَبْدِ اللَّهِ ع قَالَ قَالَ رَسُولُ اللَّهِ ص طَاعَةُ عَلِیٍّ ذُلٌّ وَ مَعْصِیَتُهُ کُفْرٌ بِاللَّهِ قِیلَ یَا رَسُولَ اللَّهِ کَیْفَ تَکُونُ طَاعَةُ عَلِیٍّ ذُلًّا وَ مَعْصِیَتُهُ کُفْراً بِاللَّهِ فَقَالَ إِنَّ عَلِیّاً یَحْمِلُکُمْ عَلَى الْحَقِّ فَإِنْ أَطَعْتُمُوهُ ذَلَلْتُمْ وَ إِنْ عَصَیْتُمُوهُ کَفَرْتُمْ بِاللَّه. (کافی، ج8، ص116).
 Allamah Majlisi, Mir’at-ul-Uqool, v.11, pg.122.
 Dirayat-ul-Noor software.
 Shaikh Al-Tusi, Al-Rijal, pg. 387.
 Shaikh Al-Tusi, Al-Fihrist, pg. 228.
 Al-Najashi, Rijal-Al-Najashi, pg. 185.
 Al-Kashi, Rijal-Al-Kashi, pg. 566.
 Ibn-Al-Ghaza’eri, Rijal-Ibn-Al-Ghaza’eri, v.1, pg. 59 and 67.
 Al-Qummi, Tafsir-Al-Qummi, v.2, pg. 50.
 Ibid, v.1, pg. 4.
 See: Sheikh Morteza Ansari, Kitab Al-Taharah, v.5, pg. 120-123.
 الإمامة من أرکان الدین و قد علم ثبوتها من الدین ضرورةً، و الجاحد لها لا یکون مصدِّقاً للرسول فی جمیع ما جاء به، فیکون کافراً Al-Muntaha (stone-printed), v.1, pg. 522.
 Sheikh Morteza Ansari, Kitab Al-Taharah, v.5, pg. 120-123.
 Osool-Al-Kafi, v.2, pg. 24-28.
 “الإسلام یُحقن به الدم و تؤدّى به الأمانة و تستحلّ به الفروج، و الثواب على الإیمان” Ibid, First hadith.
 "و أمّا من لم یصنع ذلک و دخل فی ما دخل فیه الناس على غیر علمٍ و لا عداوةٍ لأمیر المؤمنین علیه السلام فإنّ ذلک لا یکفّره و لا یخرجه عن الإسلام إلى الکفر" Osool-Al-Kafi, v.8, pg. 296, in hadith 454.
 Osool Al-Kafi, v.1, pg. 293.