The concept of human infallibility is foreign to our religion. All humans are frail. All men succumb to sin at some time or another. All humans err. Even Moshe Rabbeinu, who is assumed to have attained greater spiritual heights than all others, is described by the Torah as having erred, and also as having sinned. The nature of his sin is not exactly clear. The Ohr Hachaim quotes ten different interpretations regarding his sin at Mei Merivah. But still it was a sin of sorts.
We don't know if in fact a sacrifice of par he'elem davar shel tzibur was ever actually brought; but at least on the books, the Torah speaks of the theoretical possibility of the entire Sanhedrin issuing an incorrect "hetter" on a matter of "Kares", and having the majority of the Jewish population in Eretz Yisroel follow that erroneous psak, in which case the Beis Din would be obligated to offer the special sacrifice of Par He'elem Davar Shel Tzibbur.
Every Beis Din has a tremendous responsibility not to err. It is humanly impossible for them to prevent error! It is for that reason that Hakadosh Baruch Hu promises us that "Elokim Nitsav Beadas Kel", that He will assist the rabbis in their deliberations - to see to it that they don't err. This divine promise only applies if the rabbis are G-d fearing. The possuk only promises us that "Sod Hashem Leyereiov", G-d will reveal his secret truth to those who fear Him.
Every so often we discover that an error was made in the psak of a rabbi. But unless this is obviously the case, we are commanded by the Torah to follow the psak of the rabbanim, on the assumption that no error was made. Often a laymen, not familiar with the intricacies of halacha, will guess - based on common sense - that the rabbi's psak is in error. Laymen often don't appreciate the fact that halacha is a self-contained discipline, with a logic of its own, and the logic of common sense does not always determine what the halacha ought to be.
We assume that G-d is there behind the scenes, guiding the rabbis in each generation in the development of the halacha. And if in different generations opposing views in halacha were adopted by the different rabbis, we are not that quick to jump to the conclusion that at one period in time the halacha was distorted. We often assume that "Eilu ve'eilu divrei Elokim Chaim." The Talmud records that during the period of the first Temple, for 410 years, the mitzvah of "nisuch hayayin" was observed one way; and then, when the second Temple was built, the rabbis of that generation did not follow the precedent, but required that the mitzvah be fulfilled in a different fashion - according to their understanding. They were not implying that during the entire period of the first Temple the mitzvah was never fulfilled properly. We assume that "eilu ve'eilu."
The rabbis of the Talmud speak of "the book of Adam Harishon" which contains G-d's plan for the development of the halacha throughout all the ages. G-d will see to it that the rabbonim will not distort His Torah. And in an instance where the rabbis of a later generation determined that a specific position taken in an earlier generation was actually due to an error in judgement, they attributed that to Hakadosh Baruch Hu also. For His own reasons, G-d wanted the rabbis to take the wrong position. The Talmud quotes the possuk, "Meishiv chachomim achor, vedaitam yesakel."
Rav Soloveitchik zt"l pointed out on various occasions that when the Rambam speaks of the various heretics, he puts together the "one who denies the (Divine origin of the) Torah shebaal peh, and the one who contradicts its teachers." One who imputes ulterior motives to the psakim (halachic decisions) of an honest bona-fide rabbi, and says that Rabbi X was a convert, so that's why he always favors converts, and Rabbi Y didn't like women, so that's why in his decisions he will always put down women, and Rabbi Z is a Zionist, so that's why he will always pasken lehokel in matters regarding Eretz Yisroel, is in violation of this Ikar (principle) of faith. We not only believe that there existed at one time a Torah shebaal peh which was Divinely ordained; but rather we believe that Hashem continues to assist the G-d fearing qualified rabbis so that they should pasken properly. Emmunas chachomim is the foundation of all Orthodox Tradition!