In Galatians, Paul tells the story of how he came to Antioch and learned that Peter had stopped engaging in table fellowship with non-Jews. Paul mentions some unnamed visitors from Jerusalem as “those of the circumcision party” whom Peter feared (Gal 2:12). Other Jewish believers followed Peter’s example separating from Gentiles during meals. So Paul called Cephas (Peter) a hypocrite and said, “If you, being a Jew, live like the Gentiles and not like the Jews, how is it that you compel the Gentiles to live like Jews?" (Gal 2:14 NASB). These words can create the impression that Paul and Peter were not on the same side, or that the two had completely parted ways when it came to their theologies. However, Paul's confrontation with Peter reflects a standard Jewish practice of rebuke, which would not have marked an irreconcilable doctrinal split, but rather an ongoing in-house debate.
First, Jews can talk to each other harshly, exaggerate, argue, wave their hands in the air, and even call names, but still remain on generally good terms with each other after such arguments (Mat 5:22, 16:4, 23, Luke 3:7, 11:40). For instance, despite all of the arguments that Jesus had with the Pharisees, they were still willing to save Jesus from the Herodians: "At that very hour, some Pharisees came to [Jesus] and said to him, 'Get away from here, for Herod wants to kill you'" (Lk 13:31). Internal debate did not preclude continued alliance among Jews.
Second, when Paul confronts Peter he is performing a mitzvah -- a good deed commanded in the Torah -- called tochecha or "rebuke." However, the Torah distinguishes between "rebuke" and "hate" -- to rebuke a fellow Jew was not an act of hate, but of what we might call "tough love": "You shall not hate (תשׂנא; tisna) your fellow in your heart, [but] you must surely rebuke (תוכח תוכיח; tocheach tochiach) your neighbor" (Lev 19:17). Leviticus asserts that one can argue with or rebuke someone without hating them or discontinuing friendship. Thus, Paul could rebuke Peter and still remain on good terms with him.
Third, Paul's rhetoric is sarcastic and he explains it in the next sentence, “We are Jews by nature and not sinners from among the Gentiles” (Gal 2:15 NASB). Peter's hypocrisy is not Jewish. When “sinners from among the Gentiles” behave like that, it is understandable. But Paul and Peter are “Jews by nature” (i.e., Jews by birth) who should know better than to be disingenuous. From Paul’s perspective, Cephas compromised the truth when it was to his advantage and that is what he called “living like a Gentile.”