It seems that Paul starts out by showing of the approval he received from the apostles to preach the Gospel to the gentiles. Paul was not following the tradition and rituals of the Jews, and he was glad to get this acceptance of his freedom in Christ.

Paul openly rebuked Peter for his hypocritical ways. Peter was enjoying the freedom in Christ and spending time with the Gentile believers until the Jews showed up, then he started withdrawing and seemed to want to return to the Jewish rituals. His actions affected the others with him and they also withdrew. Today, we need to remember that our actions can affect those around us. We need to be in tune with Christ and follow Him and not worry about what others think.

Paul states that we are justified by grace and not by the works of the law. Christ is our only way for salvation.

Galatians 2:1