Sometimes you will come across the argument from scripture that opposing the Pope was done by St. Paul.
“But when Cephas was come to Antioch, I withstood him to the face, because he was to be blamed. For before that some came from James, he did eat with the Gentiles: but when they were come, he withdrew and separated himself, fearing them who were of the circumcision. And to his dissimulation the rest of the Jews consented, so that Barnabas also was led by them into that dissimulation. But when I saw that they walked not uprightly unto the truth of the gospel, I said to Cephas before them all: If thou, being a Jew, livest after the manner of the Gentiles, and not as the Jews do, how dost thou compel the Gentiles to live as do the Jews? We by nature are Jews, and not of the Gentiles sinners.” Gal 2:11-14 (Douay-Rheims)
Yet, to say that St. Paul opposed the Pope doctrinally I think is incorrect. St. Paul in the previous verses was taking about the council of Jerusalem. The same council that St. Paul was at and fell silent when St. Peter spoke. There is no doctrine involved in the dispute quoted in Galatians -it was about prudence in trying not to give offense (was there anything wrong with following Jewish customs if it did not give offense/wrong impression to the Gentiles?). St. Peter himself was the one who decided and settled the matter between Jewish and Gentiles and the council of Jerusalem. (Cf. Beginning Apologetics 1: by Frank Chacon & Jim Burnham – or my review here)
As the Challoner commentary in the Douay Rheims says, “‘I withstood’: The fault that is here noted in the conduct of St. Peter, was only a certain imprudence, in withdrawing himself from the table of the Gentiles, for fear of giving offence to the Jewish converts; but this, in such circumstances, when his so doing might be of ill consequence to the Gentiles, who might be induced thereby to think themselves obliged to conform to the Jewish way of living, to the prejudice of their Christian liberty. Neither was St. Paul’s reprehending him any argument against his supremacy; for in such cases an inferior may, and sometimes ought, with respect, to admonish his superior.”
Secondly, St. Paul was the Apostle to the Gentiles. Most, people don’t have that kind of authority or rank and so should stop and really think before they challenge a Pope on something.
Thus, I think we should think twice before we use Galatians as an argument for why we are challenging the Pope on any of his teachings/doctrine.