Galatians 2:14
But when I saw that they walked not uprightly according to the truth of the gospel, I said unto Peter before them all, If thou, being a Jew, livest after the manner of Gentiles, and not as do the Jews, why compellest thou the Gentiles to live as do the Jews?
At Antioch Peter had been eating and living with Gentile believers without observing Jewish customs, then withdrew from table fellowship with them when Jewish Christians arrived. By withdrawing he walked not uprightly according to the truth of the gospel, acting inconsistently with his own practice and convictions through dissembling, wavering, and a double, two-sided part. His conduct pressured Gentile converts to live as Jews by adopting Jewish customs, making it appear that they had to do so. His example influenced others, including Barnabas, and its misleading influence by a respected leader threatened division in the church.
When Paul saw this, he withstood Peter face to face and rebuked him publicly before them all for his inconsistency. Peter's wavering came from fear of man and of people, desire for approval and esteem, and pressure from Jews zealous for the ceremonial law, showing that efforts to appease prejudice can compromise principle. The failure was grave because it came after his past failures, fall and restoration, long course of service, intimate acquaintance with Christ and knowledge of Christ's pure straightforward practice of principle, all the instruction he had received, and all his gifts, knowledge, and great influence in preaching and teaching the Word.
Paul openly took his position against Peter, a pillar of the church and his companion in labor, and against Barnabas, who had honored Paul with the right hand of fellowship when other Christians were afraid of him and questioned his fitness because he had persecuted the church. Paul did so because the Holy Spirit had shown him that God's gifts come straight from God to all who seek Him with a whole heart, circumcised and uncircumcised, Barbarian, Scythian, bond and free. Having been touched and made tender by the Spirit, placed under God's control, given increased light and taught by God the truths of the gospel able to make men wise unto salvation, he held to that inspired truth, dedicated himself and all his powers to God, firmly resisted binding unnecessary burdens on Gentile Christians, and held his ground when his brethren withstood him and protested that he advocated theories contrary to fundamental principles they had been taught, even though apostles who ought to have upheld him opposed him.
Peter's error shows he was human and fallible and could be corrected, with no authority above the other apostles and no claim to prerogatives belonging only to God, giving no support to claims that he was the church's supreme head or that later leaders inherited such authority. The rebuke is recorded that others may profit by it as a solemn warning to men in high places to keep close to principle and not fail in integrity. It proves that even the best of men left to themselves will make grave blunders, and that even a seasoned servant with knowledge, experience, and influence cannot guide himself safely without recognizing his helplessness. The more responsibilities and the higher the position to dictate and control, the more mischief is done in perverting minds and hearts if the way of the Lord is not carefully followed, so every man needs a sense of personal helplessness to steer his vessel straight and safely into the harbor, and the grace of Christ is essential every day, for His matchless grace alone can save feet from falling. Peter recognized his error and tried to repair the harm, showing that even apostles could err when not directly guided by the Spirit.