You are incorrect to a certain extent. While we acknowledge that the Pope can make infallible statements when acting under what is known as “ex cathedra”, the Pope is a fallible person when in relation to anything other than Faith and Morals. It’s not like the Pope can say anything and it becomes Infallible Truth.
Did you know that Peter was mentioned in the New Testament 155 times? When adding the mentions of every other Apostle, they equal 130 when added together. This is an example of how Peter had such a primacy in relation to the other apostles.
Likewise, Peter, just like Paul, was an fallible human being and made an error. And he was rebuked for his error (which was of a cultural/leadership style manner) just as it is supposed to be. His faith wasn’t condemned, but what he had done. For this is what the full set of verses say:
11 When Cephas came to Antioch, I opposed him to his face, because he stood condemned. 12 For before certain men came from James, he used to eat with the Gentiles. But when they arrived, he began to draw back and separate himself from the Gentiles because he was afraid of those who belonged to the circumcision group. 13 The other Jews joined him in his hypocrisy, so that by their hypocrisy even Barnabas was led astray.
14 When I saw that they were not acting in line with the truth of the gospel, I said to Cephas in front of them all, “You are a Jew, yet you live like a Gentile and not like a Jew. How is it, then, that you force Gentiles to follow Jewish customs? (NIV)
We are all fallible human beings. And while we (Catholics) trust in the leadership of the Church, we remember that we are to correct one another when in error, and to always grow in love and faith in Christ.