Even though Peter knew that God had freed him from the law (like kosher laws), when certain men from Jerusalem came, Peter along with others withdrew from table fellowship with Gentiles so as to look like they were keeping the kosher laws.
Paul deals with Peter’s hypocrisy (and racism and fear) by declaring that he was not living “in line with the truth of the gospel.” From this we see that the Christian life is a process of renewing every dimension of our life-- spiritual, psychological, corporate, social--by thinking, hoping, and living out the “lines” or ramifications of the gospel. The gospel is to be applied to every area of thinking, feeling, relating, working, and behaving. The implications and applications of Galatians 2:14 are vast.
The gospel is not moralism or relativism. It is the reality that we are more sinful than we think we are but more loved and accepted by God through Jesus Christ than we can imagine. The gospel is grace and truth. We need to work out every issue in our lives and put it in line with the truth of the gospel.