Circumcision and dietary restrictions were both unique, ceremonial laws to the nation Israel. God wasn't requiring circumcision or dietary restrictions for the whole world. Circumcision had to do with God's covenant with Abraham, which applied specifically to him and his physical descendants (Gen 15 and 17). Keeping ceremonial laws kept you in good standing in Israel, but it didn't mean you were saved, as seen in multiple places in the Old and New Testaments. Dietary restrictions had been lifted by God's communication to Peter in Acts 10.
Peter also got in trouble with the James gang for eating with Gentiles (Galatians 2:12). They weren't eating right, so even if he was eating right, he shouldn't eat with them when they were eating wrong. Peter knew the dietary restrictions were lifted and that Gentiles were not unclean, but this had not been fully accepted by all the professing Jewish Christians, so he stopped eating with Gentiles, confusing the gospel. Did you have to keep ceremonial laws to be saved or not? Paul confronted him to his face over this (Galatians 2:11).
According to Galatians 2:3, Paul brought Titus to Jerusalem because he was not circumcised, so he was a good example of the requirements of the gospel. Titus was not expected to be circumcised, because Christ had fulfilled the ceremonial laws on the cross. So did the gospel change God's expectations for how one of His were supposed to live?
Later in Galatians 2:17, Paul writes:
But if, while we seek to be justified by Christ, we ourselves also are found sinners, is therefore Christ the minister of sin? God forbid.This is very similar to Romans 6:1-2, also by Paul:
What shall we say then? Shall we continue in sin, that grace may abound? God forbid. How shall we, that are dead to sin, live any longer therein?The argument of the Judaizers or the Galatianists, leading to Galatians 2:17, was that the rejection of circumcision and dietary restrictions meant that justification by Christ made Christ a minister of sin. If that were the case, then in Galatians 2:18, Paul said that he would also make himself a transgressor, if what they were saying were true. In the next verse, 2:19, Paul writes:
For I through the law am dead to the law, that I might live unto God.Gill writes concerning this:
The apostle further replies to the objection against the doctrine of justification, being a licentious one, from the end of his, and other believers, being dead to the law: he owns he was dead unto it, not in such sense as not to regard it as a rule of walk and conversation, but so as not to seek for life and righteousness by it, nor to fear its accusations, charges, menaces, curses, and condemnation: he was dead to the moral law as in the hands of Moses, but not as in the hands of Christ . . . . the apostle by the doctrine of grace was taught not to seek for pardon, righteousness, acceptance, life, and salvation, by the works of the law, but in Christ; by the doctrine of the Gospel, which says, believe on the Lord Jesus Christ and thou shall be saved; he became dead to the law, which says, do this and live: or through the books of the law, and the prophets, the writings of the Old Testament, which are sometimes called the law, he learnt that righteousness and forgiveness of sins were only to be expected from Christ, and not the works of the law; things, though manifested without the law, yet are witnessed to by the law and prophets: or through the law of his mind, the principle of grace formed in his soul, he became dead to the power and influence of the law of works, he being no longer under the bondage of that, but under grace, as a governing principle in his soul.As is most often the case with Gill, that's a long paragraph. I've drawn your attention to a few points with underlining.
Paul would not become a transgressor and Christ would not be a minister of sin through justification by grace through faith. Paul would still obey God's moral law, but through Christ who lived in him, as Galatians 2:20 reads:
I am crucified with Christ: nevertheless I live; yet not I, but Christ liveth in me: and the life which I now live in the flesh I live by the faith of the Son of God, who loved me, and gave himself for me.
The gospel does not change what God expects. God still expects morality. He still expects righteousness. It is not the change in expectations, but a change in capability. It wasn't Paul living it, but Christ in Him. The expectations stayed and the means by which he lived those expectations changed. He could do it now by the grace of God.
Later in Galatians, Paul reminds of this in Galatians 5:13:
For, brethren, ye have been called unto liberty; only use not liberty for an occasion to the flesh, but by love serve one another.
The liberty Paul found in the grace of God was not for an occasion to the flesh. The expectations didn't change, but the empowerment and motivation changed through conversion and the indwelling presence of the Lord.
Legalism is both left and right winged. You can act like the Judaizers from Jerusalem, who added to the expectations and nullified God's grace with works. That's right winged legalism. You can shorten the list of expectations so that you can live them on your own. Both are human effort and rejected by God. The gospel doesn't diminish God's standards, but it enables them.