Paul is quoting here from Deuteronomy 27:26, a principle echoed in Jeremiah 11:3.

"Of works," like "of faith" in verses 5 and 7, shows a person's origin—their source or basis of their spiritual life, and what they depend on. This follows the theme that we are justified and glorified (saved) by grace through faith, and not by our own righteousness. So Paul is saying here that those people who have their basis of spirituality in their own works and righteousness, rather than in their Creator, are under a curse.

In this verse, as with much of the rest of his letter to the Galatians, Paul is addressing the problem of justification by works—he is not condemning the law. It is evident from his other writings that Paul is not in any way anti-law (Romans 2:12-16,26; 3:31; 6:12; 7:12,22,25; 8:7; I Corinthians 7:19; I Timothy 1:8-11; II Timothy 2:5; Titus 1:16; 2:11-14; Hebrews 1:8-9; 8:10; 10:26-29), but rather in this epistle he is endeavoring to show the place that law and works should hold in a Christian's life. He is against the misuse or abuse of law. God's law plays a vital part within the sanctification process, because it is during this time in a Christian's life that character is being built, that we are growing, overcoming, etc.—all of which require that a standard of conduct (law) be present.

James explains this further in James 2:10-12:

For whosoever shall keep the whole law, and yet offend in one point, he is guilty of all. For he that said, Do not commit adultery, said also, Do not kill. Now if thou commit no adultery, yet if thou kill, thou art become a transgressor of the law. So speak ye, and so do, as they that shall be judged by the law of liberty.

This shows that our own righteousness could never suffice for the purpose of justification, because we all have sinned. But after we have been justified and entered into the New Covenant, the law is still very much valid for the purpose of sanctification. We are told in James 2:12, as in other places, that we will be judged, and the standard for that judgment will be the law of God.