These final verses of chapter 2 are dense. I find it sometimes difficult to wrap my thick, boxy brain around these kinds of passages. But let's give it a go.
The place to start is with sin. That's always a fun place to start, right? Specifically, there's two concepts of sin hovering over these five verses.
First, there's the aspect of sin Paul grew up with that related to Gentiles. Because Gentiles did not know the law and did not follow the law, with its rituals and vast array of what to do and what not to do, they were stuck in a position of sin from which the only escape was to follow the law. That was how the Pharisees interpreted God's Word and God's Law. Gentiles were sinners because they did not keep the law.
Here's a passage to keep in mind as we develop these two understandings
of sin. It's a parable told by Jesus. As we move through Galatians 2:17-21, you're going to recognize this parable as foundational to what Paul is saying:
He also told this parable to some who trusted in themselves that they were righteous, and treated others with contempt: “Two men went up into the temple to pray, one a Pharisee and the other a tax collector. The Pharisee, standing by himself, prayed thus: ‘God, I thank you that I am not like other men, extortioners, unjust, adulterers, or even like this tax collector. I fast twice a week; I give tithes of all that I get.’ But the tax collector, standing far off, would not even lift up his eyes to heaven, but beat his breast, saying, ‘God, be merciful to me, a sinner!’ I tell you, this man went down to his house justified, rather than the other. For everyone who exalts himself will be humbled, but the one who humbles himself will be exalted.”