In The Name of Allaah, The Most Merciful, The Bestower of Mercy
Allaah [The Most High] said:
وَإِن تُطِعۡ أَڪۡثَرَ مَن فِى ٱلۡأَرۡضِ يُضِلُّوكَ عَن سَبِيلِ ٱللَّهِۚ إِن يَتَّبِعُونَ إِلَّا ٱلظَّنَّ وَإِنۡ هُمۡ إِلَّا يَخۡرُصُونَ
إِنَّ رَبَّكَ هُوَ أَعۡلَمُ مَن يَضِلُّ عَن سَبِيلِهِۦۖ وَهُوَ أَعۡلَمُ بِٱلۡمُهۡتَدِينَ
And if you obey most of those on earth, they will mislead you far away from Allah’s Path. They follow nothing but conjectures, and they do nothing but lie. Verily, your Lord! It is He Who knows best who strays from His Way, and He knows best the rightly guided ones. [6:116-117]
Allaah [The Most High] said to His Messenger [sallal-laahu-alayhi-wasallam] whilst warning him against obeying the majority of the people: [وَإِن تُطِعۡ أَڪۡثَرَ مَن فِى ٱلۡأَرۡضِ يُضِلُّوكَ عَن سَبِيلِ ٱللَّهِۚ – And if you obey most of those on earth, they will mislead you far away from Allah’s Path]; Meaning: The majority of the people have deviated from their religion [i.e. the sound religion of Tawheed revealed to all the Prophets and Messengers], (upright) deeds and knowledge. Their religious practices are corrupted and their deeds are based on their desires [i.e. not based on the final revelation revealed by Allaah to mankind and Jinn]. Likewise, their knowledge is neither based on certainty nor does it guide towards the path of righteousness; rather their aim is to follow conjecture, which can be of no avail against the truth. They lie and speak about Allaah without knowledge, therefore it is inevitable that Allaah warns His servants [i.e. mankind] regarding the likes of these people and describe their state of affairs. And even though this ayah was an address to the Prophet [sallal-laahu-alayhi-wasallam], however the Ummah is to follow him in all the rulings which have not been specified to him [i.e. unless something is proven by text to show that a ruling is only applicable to the Prophet, otherwise such a ruling is also applicable to the Ummah].
Then Allaah [The Most High] said: [إِنَّ رَبَّكَ هُوَ أَعۡلَمُ مَن يَضِلُّ عَن سَبِيلِهِۦۖ وَهُوَ أَعۡلَمُ بِٱلۡمُهۡتَدِينَ- Verily, your Lord! It is He Who knows best who strays from His Way, and He knows best the rightly guided ones]; Meaning: Allaah knows who follows the straight path and directs others to it. Therefore, it is obligated on the believers to follow Allaah’s advice; obey Allaah’s commands and keep away from what Allaah has forbidden because Allaah knows what is best for them and Allaah is more Merciful to them than they are to themselves.
This ayah shows that the mere fact that the majority of people (are followers of a particular path) is neither a proof that they are upon truth nor that a small number of people (upon a particular way) is proof that they are upon falsehood; rather the fact is that the people of truth are smaller in number, but they are exalted in the sight of Allaah and will receive great reward. Therefore, it is obligated (on a person) to judge truth and falsehood based on what Allaah has revealed as the only means to judging what is true or false.
[Source: Tayseer Al-Kareem Ar-Rahmaan Fee Tafseer Kalaam al-Mannaan’ by Imaam Sadi (rahimahullaah). Abridged & slightly paraphrased]