Peter left Jerusalem to travel north to AntiochGentile territory.
Paul didn't go storming down to Jerusalem, saying, "Have a sausage, Peter. I dare you." No, Peter was in Paul's arena, and because Peter was trying to get the people to whom Paul was ministering to go in a different direction, Paul was justified in pointing out Peter's hypocrisy.
There have been occasions when, as a shepherd, I have had to physically remove those who came in, wanting to take this flock in a direction contrary to the gospel of grace. But I will not go into another church and pronounce judgment or give correction. When Paul was in Peter's face, he was on his own turfin Antioch, not Jerusalem.
This phrase indicates very simply and clearly that traditions claiming either that Peter was the first pope, or that popes are infallible in matters of doctrine and church practice, are mistaken. If Peter was the first pope, he was far from infallible here.