tsk tsk tsk. If I had a dollar for the times I've had to address Galatians 2 on here...
11. But when Cephas came to Antioch, I opposed him to his face, because he stood condemned.
12. For prior to the coming of certain men from James, he used to eat with the Gentiles; but when they came, he began to withdraw and hold himself aloof, fearing the party of the circumcision.
What was Peter doing here? He was behaving just like a sinner. Just like a Gentile. Don't believe me? Let's see what Messiah has to say about his behavior.
46. "For if you love those who love you, what reward do you have? Do not even the tax collectors do the same?
47. "If you greet only your brothers, what more are you doing than others? Do not even the Gentiles do the same?
Peter was guilty of the very thing Messiah taught on at the end of Matthew 5. He was behaving JUST LIKE A GENTILE! For fear of the circumcision judaizing group, he would only hang out with his jewish brethren. Not only that, what makes matters worse, Peter was the one God personally addressed in a vision in Acts 10 instructing him that it's good to deal with Gentile believers!
Not sure you know this but the Torah teaches that "the stranger who resides with you shall be to you as the native among you, and you shall love him as yourself, for you were aliens in the land of Egypt; I am the LORD your God." - Leviticus 19:34.
Peter was going against the Torah, and against the teachings of Messiah by behaving like a gentile, or sinner in fear of the circumcision group.
THIS is why he was rebuked by Peter. They were being hypocrites!
13. The rest of the Jews joined him in hypocrisy, with the result that even Barnabas was carried away by their hypocrisy.
It's funny that many think this "living like Gentiles" was a positive awesome thing, when in actuality it was hypocrisy and dishonest. In fact Paul gives a pretty good definition of what he meant with the term "Gentile" in verse 15!
14. But when I saw that they were not straightforward about the truth of the gospel, I said to Cephas in the presence of all, "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?
Peter was behaving like the Gentiles, while trying to compel them to behave like children of God.
15. "We are Jews by nature and not sinners from among the Gentiles;
Hope that helps.