Ehrman gives an excellent summary of the Incident at Antioch in his Peter, Paul, and Mary Magdalene (p 21):
According to Paul’s account in the book of Galatians, Peter came to visit Antioch and followed suit, meeting with both Jews and Gentiles (Gal. 2:11–12). Now, for strict (non-Christian) Jews, this kind of meeting practice could pose serious problems, since eating a meal with Gentiles would entail not keeping kosher. At first, Peter, like Paul, evidently did not see this as a problem. After all, what mattered for salvation was not kosher food but the death of the messiah.
But then other Jewish Christians arrived from Jerusalem. These were close associates of James, the brother of Jesus, who was evidently the ultimate authority in the Jerusalem church at this time. These visitors did not subscribe to Paul’s view of Gentiles, maintaining instead that it was important for them to keep the Jewish law if they were to be followers of the Jewish messiah… [Peter] decided that it was best not to alienate the visitors from Jerusalem. And so he stopped holding fellowship with the Gentile Christians and ate meals only with the Jewish Christians, thereby keeping kosher.
In fairness to Peter, this may have been simply an attempt to avoid offending someone with sensibilities different from his own. But Paul did not see it that way, and once again—Peter may have been used to it by this time—he issued a severe and public rebuke: “And when I saw they were not straightforward about the truth of the gospel, I said to Cephas before them all, ‘If you, a Jew, live like a Gentile even though you are Jewish [i.e., if you normally don’t keep kosher], how can you compel the Gentiles to live like Jews [i.e., how can you now insist that Gentiles do keep kosher]?” (Gal. 2:14). Paul’s logic was that when Peter withdrew from eating with Gentiles, he was showing that deep down he thought that keeping the Jewish law mattered for a right standing before God. But if that’s what he thought, then he was previously behaving hypocritically. So he was a hypocrite either earlier or now—either way, it was fickle and it wasn’t good… Peter, once more acting rashly without thinking out the consequences, changed his mind, repented of his behavior, and was rebuked for it.