Galatians 3:23 Before this faith came, we were held prisoners by the law, locked up until faith should be revealed.
“Before” Jewish tradition divided human history into a series of stages. Paul will explain further in verse 21, but the era when the law took precedence was finite – the law served as a guardian for the Jewish people until such a time as God fulfilled the original promise, or, as he says later on here, “until faith should be revealed.”
“this faith” This, of course, is Jesus, as verse 22 had explained, its “faith in Jesus Christ” that fulfills the promise for each of us.
“we were held prisoners of the law” Paul continues his prison metaphor from the previous verse. In verse 22, we are identified as “prisoners of sin,” here, we are “prisoners of the law.” We can connect the first notion back to the fall of Adam – our base nature is that of sin. Paul discusses this in Romans 5:15-21 – We are all condemned – trapped – through Adam’s sin. Being a prisoner of the law is a similar concept, because the law reveals what sin is to us, and stimulates the desire to sin, not unlike the forbidden fruit in the Garden of Eden. Recall Galatians 3:10-14, that the law places us under a curse. Later, in Galatians 4:3, Paul will define our relationship to the law as one of slavery. In Romans 7:8, Paul states that sin, as our base nature, grabs hold of the concepts in the law in order to produce in us “every kind of covetous desire.” In Colossians 2:20, Paul argues that we are submitted to the world’s rules. Regardless, the concept is the same. With or without the law and its rules, we are still trapped. Our base nature is sinful – we are prone to turn away from God and "do our own thing.” The law not only defines what is necessary for morality, but it combines with our sin nature to produce a compulsion to do the very things the law prohibits. Paul spends most of Romans 7 lamenting this basic, common struggle everyone goes through. The answer – the key we need to open the prison door of both sin and the law – is faith in Jesus, a living relationship with the Messiah.