Paul uses the practice of both Jewish and gentile children coming of age in the first century AD and likens this with how God treats mankind since the coming of Christ. A Jew came of age or received his bar mitzvah about the age of 12. Similarly, “a Roman child became an adult at the sacred family festival known as the Liberalia, held annually on the seventeenth of March. At this time the child was formally adopted by his father as his acknowledged son and heir and received the toga virilis in place of the toga praetexta, which he had previously worn.” The Roman youth came of age at the time appointed of his father, usually between the ages of 14 and 17. In Galatians 4:9 Paul likens the Galatians’ practice of Judaism as an adult returning to the days of his youth in order to live as they did as children under a guardian.
Paul likens the gentile youth to a slave in Galatians 4:1. Before coming of age there simply was no difference between the two even though the one would inherit everything his father had. Before his adoption, the youth was placed in the care of a slave or custodian (Galatians 4:2).
Just as the Jews were kept under the Law, the gentiles were held in bondage of the elements of the world (Galatians 4:3). But, what are the elements of the world, according to Paul? They were ‘elementary knowledge’. Paul refers to it in Colossians as the rudimentary philosophy and traditions of men (Colossians 2:8, 20). In Galatians 4:9 Paul refers to the doctrine of the Judaizers, which the Galatians embraced as elements of the world. In reality the basic principle of cause and effect was embraced by both Jews and gentiles. For the Jews it might be said “what you sow, you shall reap,” while for the gentiles it might be expressed “you get what you deserve”. Good deeds done will have good returned, and evil deeds done will bring evil in return (some call it karma). While this may be a truism known to all in life, it has nothing to do with grace or salvation, to which Paul’s analogy of the child coming of age points (cf. Matthew 6:26; Luke 12:24; and Matthew 25:24).
It is interesting that it was the Roman father who terminated the custodian’s authority. Concerning Paul’s analogy pointing to the elements of the world or the Law of Moses it was God who terminated that authority. The gentile youth was subject to the elements “until the time appointed by his father” (Galatians 4:2). In using this phrase, Paul discloses that he is speaking of the Roman rite. Both Greek and Jewish custom had a specific age for when one’s child was treated as an adult. For Jews that was 12 and for Greeks it was 18, but for Romans no specific age was in use, and it could vary anywhere from 14-17. It depended upon when the father thought the child was mature enough to begin his adult life.
Paul concludes that the Galatians’ recent religious activity places his labor among them in doubt—that is, he labored for nothing, because they rejected his Gospel for Judaism. If entering into a mature relationship with God is done through faith and the Galatians now believed a mature relationship with God came through obedience to the Law, then faith and Paul’s Gospel were rejected, and Paul’s labor would have been in vain (Galatians 4:11).
Paul concludes that relating to God through the works of the Law is a vain effort. It cannot be done this way. God had ordained that a relationship with him would come through faith alone (Galatians 3:25-26). In our coming of age we leave behind the ‘elements of the world’ which include the ‘works of the law’ under Judaism (Galatians 4:9-10), and embrace God through faith in Christ (Galatians 3:24) at the time appointed by the Father (Galatians 4:2).
 James Montgomery Boice, “Galatians,” in Romans-Galatians, vol. 10 of The Expositor’s Bible Commentary,