Up to this point in Galatians, Paul has said some pretty harsh things about the Law in order to convince the Galatians that works of the Law are not a necessary part of their salvation. All of these negative comments about the Law might lead one to wonder why God gave the Law in the first place. If the Law couldn't bring life and righteousness, then why did God even bother with the Law in the first place? Or was the Law even God given?
Paul answers these questions in Galatians 3:19-29. He says that the Law was given through angels by a mediator thereby distancing the giving of the Law from God himself. However, Paul says the Law was not contrary to God's purposes. Instead, God allowed the Law to act as a custodian in the time between Moses and Christ. Specifically, Paul says that Law was a paidogogos, that is, a slave who was in charge of making sure that a child made it safely to and from school everyday. When the child was no longer school-age, the service of the paidogogos was no longer needed. Paul says the function of the Law was similar; it's purpose was to keep God's people safely on the right path until the faithfulness of Christ was revealed. Now that righteousness by faith/faithfulness has been revealed, the services of the Law are no longer needed.
This brings Paul back to his main point that he has been making all along; the Galatians are already children of God by virtue of their faithful living in Christ Jesus and therefore have no need of works of the Law. The Galatians were clothed with Christ when they were baptized just as the Jewish Christians teachers were. That means there is no difference between them.
Interestingly, Paul doesn't leave it at that. Paul has been trying to erase the boundary between Jew and Gentile for the entire letter so his first in the list of pairings that appears in v. 28 comes as no surprise. However, Paul goes on to say that there is also no difference between slave and free, male and female for they are all one in Christ Jesus and therefore Abraham's descendants and heirs according to the promise.
With this, we get a glimpse into Paul's larger understanding of the Church. The new creation inaugurated in Christ and lived out in the Church doesn't only erase the boundary between Jew and Gentile but all kinds of other boundaries that divide our world as well. While socio-economic and gender divisions may still exist in our world, Paul says that they have no place in the Church. The gathering of Christ's followers is to be a place where the rules of the old world no longer apply. Instead, those who gather around the body of Christ are brothers and sisters, members of one body, and to be treated with love and equality regardless of their position or status outside of the Church.