The meaning of the Pauline phrase "works of the law" (Greek: ergon nomou) is the hinge on which the 16th century debate over faith and works swings.
Even in the Catholic Church, there has been debate as to the meaning of the St. Paul's phrase "works of the law" since the time of St. Augustine and St. Jerome.
St. Jerome held that "works of the law" referred not the moral law (i.e. the Ten Commandments) but to the civil and ceremonial law of Moses (e.g. circumcision, kosher dietary prohibitions, new moons, Temple sacrifice, etc.). St. Augustine held that "works of the law" extended to all works, whether or not they pertained to the legislation of Moses. Both were correct.
From a textual point of view, "works of the law" relates to ceremonial works of the Torah. However, and this is a big however, all works in general are incapable of meriting justification from God. The Torah of Moses amplified man's inability to save himself and highlighted Israel's failure to be priestly and sacrificial. In this sense, Augustine is correct - works of the law indicated that all works are impotent.
As I stated in a previous post, the Council of Trent authoritatively taught that "nothing that precedes justification, whether faith or works, merits the grace of justification. For if it is by grace, it is no more by works. Otherwise, as the apostle says, grace is no more grace."
Trent teaches that works prior to justification, whether Jewish works of the Torah or works of any kind, are unable to merit justification. As Louis Bouyer explains, Luther's novel formulation of "justification by faith alone" was an attempt to safeguard this doctrine. Unfortunately, Luther's desire to ensure the gratuitous nature of justification led him to adopt the unbiblical articulation of "justification by faith alone." This articulation is not found in Scripture or in the Tradition of the Church.
So what are "works of the law"? Specifically, "works of the law" are the ceremonial precepts of Israel that cannot justify a man before God. Generally, "works of the law" signify that all works are insufficient to justify a man before God. If the divinely revealed precepts are ineffectual, a fortiori, how much more any other kind of work!