What is the sin of St.Peter that made St.Paul opposed him in Galatians2:11?
St.Peter did not commit any sin in Galatians2:11 and St.Paul based his opposition with Peter on the Doctrine agreed upon at the Council of Jerusalem.
St.Peter agreed with St.Paul inspiration how to preach the Gospel of Christ to the Gentiles by not requiring them to follow the Mosaic Law or restrictions like circumcission and other known Jewish Law but since the Council of Jerusalem was not yet fully understood and embraced by other Jews like some of the Disciples of St.James present in Antioch, St.Peter prudently withdraw from eating with the Gentiles the moment he sense some disapproval with Jews present and perhaps with the intention to explain His side and explain the Doctrines agreed upon with the Council of Jerusalem with St.Paul.
But, St.Paul obviously filled with the Holy Spirit was inspired to use the incedent to convict the heart of the Jews including St.Peter that although Jesus did not come to abolished the Mosaic Law but "Unity and Brotherhood" is above all the desired by Jesus in the Gospel. Jesus Christ clearly teaches in His public ministry that the greatest of all this is not the perfection of faith but Love. Faith must be express in love and thru charity as Jews and Gentiles are all adoptive children of God.
St. Paul obviously was inspired by the Holy Spirit to remind St.James disciples and all the Jews present of the need for them to expressed the faith with charity towards unity with the Gentiles.
"And now these three remain: faith, hope, and love; but the greatest of these is love."(1Corinthian13:13)
"For in Christ Jesus neither circumcision nor uncircumcision has any value. All that matters is faith, expressed through love.(Galatians5:6)
We need also to consider that the Council of Jerusalem is not yet clear to all the Jews and St.Peter in Antioch were showing St.Paul that he believed in the inspiration to Him by Jesus on how to treat the converted Gentiles, and so St.Peter conversing, associating and eating together with the converted Gentiles had proved that he followed that inspiration and their agreement.
Below is some explanations of the incident citing Barnabas as the key person that facilitate the meeting St.Paul and St.Peter and the other Apostles in the year around AD47 to AD51.
Barnabas and Paul had been "for no small time" at Antioch, when they were threatened with the undoing of their work and the stopping of its further progress. Preachers came from Jerusalem with the gospel that circumcision was necessary for salvation, even for the Gentiles. The Apostles of the Gentiles, perceiving at once that this doctrine would be fatal to their work, went up to Jerusalem to combat it; the older Apostles received them kindly and at what is called the Council of Jerusalem (dated variously from A.D. 47 to 51) granted a decision in their favour as well as a hearty commendation of their work (Acts 14:27-15:30). On their return to Antioch, they resumed their preaching for a short time. St. Peter came down and associated freely there with the Gentiles, eating with them. This displeased some disciples of James; in their opinion, Peter's act was unlawful, as against the Mosaic law. Upon their remonstrances, Peter yielded apparently through fear of displeasing them, and refused to eat any longer with the Gentiles. Barnabas followed his example. Paul considered that they "walked not uprightly according to the truth of the gospel" and upbraided them before the whole church (Galatians 2:11-15). Paul seems to have carried his point. Shortly afterwards, he and Barnabas decided to revisit their missions. Barnabas wished to take John Mark along once more, but on account of the previous defection Paul objected. A sharp contention ensuing, the Apostles agreed to separate. Paul was probably somewhat influenced by the attitude recently taken by Barnabas, which might prove a prejudice to their work. Barnabas sailed with John Mark to Cyprus, while Paul took Silas an revisited the churches of Asia Minor. It is believed by some that the church of Antioch, by its God-speed to Paul, showed its approval of his attitude; this inference, however, is not certain (Acts 15:35-41).
Below is some exceprt from Fr.Erchert answered on EWTN site;
explaining that St.Peter had not committed a sin but his behaviour out of fear and pressure from the Jews who had not yet understand the Holy Spirit inspiration to St.Paul as agreed upon at the Council of Jerusalem contributed to the confusions. And since the Holy Spirit wanted to clear out the confusions that had developed corrected the Jews infront of the Gentiles to prevent future incedent to happen and St.Paul was the one inspired to do the rebuked. The rebuked is not directly intended to St.Peter but to the Jews particularly to the Disciple of St.James as the Holy Spirit knows our heart. St.Peter did not commit a sin but his error is he lacked courage to expressed with conviction his belief on the agreed doctrine at the Council of Jerusalem.
Verse nine concludes the account of a Council at Jerusalem which included Peter at which the apostles approved of the Gospel to the Gentiles without circumcision and the bulk of Mosaic restrictions. Yet subsequent to this, because of peer pressure, Peter drew back from taking meals with the Gentile Christians. This pressure was, no doubt, from Jewish Christians who held tightly to the distinctions between clean and unclean. At any rate, in light of his character as evident in the Gospels, in one sense it is no surprise that Peter acted in such a manner out of fear; for even though the Holy Spirit was active in this leader of the apostles, he was still human and subject to human frailty, especially with regards to personal weaknesses.
But as to the issue of infallibility, this is not claimed to be with regards to everything that a pope says or does, but in those matters in which he intends to speak infallibly, specifically, in matters of faith and morals. A pope may behave badly or choose poorly, for there is no such immunity from human weakness in every aspect of his life. In the case of St. Peter, he may not have sinned by his action but did not act courageously as he might have. And St. Paul challenged the behavior, given the implications to the Gospel of the behavior of Peter. In other words, only because there was so much at stake did the Apostle to the Gentiles challenge publicly the Vicar of Christ. But I would not suggest such public reproofs to a pope today, unless you have been called by God to the level of St. Paul. Even so, you had better be sure of your position, as St. Paul was of his.
In closing, we can see that St.Peter did not sinned but only lack the courage to upheld with conviction what they had agreed upon at the Council of Jerusalem.