There are some who always want to answer that question in the negative while affirming that of course we have no part in our justification (Jesus did it all) and yet insisting that our Spirit enabled good works are surely necessary in order to complete our sanctification, increase our heavenly reward and/or ultimately secure our salvation. I know the distinction raised is that these works of ours which we contribute to our salvation are not meritorious, only necessary. Well, I affirm, they are necessary inasmuch as dead trees produce no fruit. Live ones do.
So, good works are necessary in the Christian life as evidence of the existence of a Christian life. The question is why? The reason isn't to just simply show evidence of faith. Simply put, as followers of Christ we are called by him to godly living. We are called to dutifully obey the law he has written on our hearts, which law our inward man now embraces as good. God means to work that law written on our hearts into new godly motives and behaviors. We are called unto good works, to love God and neighbor. And yet though good works are not optional, they add nothing to our salvation (they are evidence of it) - which is by grace alone, through faith alone in Christ alone (Eph. 2:8-10). God's law still requires absolute perfection in our good works. And our good works fall way short of that perfection. They add nothing because each of our works carries with it the remnant of sin. Except for Christ's righteousness imputed to us they would be rejected.
5. We cannot by our best works merit pardon of sin, or eternal life at the hand of God, by reason of the great disproportion that is between them and the glory to come; and the infinite distance that is between us and God, whom, by them, we can neither profit, nor satisfy for the debt of our former sins, but when we have done all we can, we have done but our duty, and are unprofitable servants: and because, as they are good, they proceed from his Spirit; and as they are wrought by us, they are defiled, and mixed with so much weakness and imperfection, that they cannot endure the severity of God's judgment. (WCF 16 - Of Good Works)We are but unprofitable servants in that what proceeds from us is yet still defiled. But inasmuch as our works are received as good by God, they are deemed as such for the sake of Christ, preceding from his Spirit by grace. In a word - "So Jesus also suffered outside the gate in order to sanctify the people through his own blood" (Heb. 13:12); and as the confession states, "They...are further sanctified, really and personally, through the virtue of Christ's death and resurrection, by his Word and Spirit dwelling in them..." (WCF 13 - Of Sanctification).
J. Gresham Machen adds his two cents:
They [the Judaizers of the Galatian letter], believed, moreover, that faith in Christ was necessary to salvation. But the trouble was, they also believed that something else was also necessary; they believed that what Christ had done needed to be pieced out by the believer's own effort to keep the Law...(Christianity and Liberalism)
Paul saw very clearly that the difference between the Judaizers and himself was the difference between a religion of merit and a religion of grace...
The difference which divided him from the Judaizers was no mere theological subtlety, but concerned the very heart and core of the religion of Christ. "Just as I am without one plea, But that Thy blood was shed for me" - that is what Paul was contending for in Galatia; That hymn would never have been written if the Judaizers had won. And without the thing which that hymn expresses there is no Christianity at all...
If Christ provides only a part of our salvation, leaving us to provide the rest, then we are still hopeless under the load of sin. For no matter how small the gap which must be bridged before salvation can be attained, the awakened conscience sees clearly that our wretched attempt at goodness is insufficient even to bridge that gap. The guilty soul enters again into the hopeless reckoning with God, to determine whether we have really done our part. And thus we groan again under the old bondage of the law. Such an attempt to piece out the work of Christ by our own merit, Paul saw clearly, is the very essence of unbelief; Christ will do everything or nothing, and the only hope is to throw ourselves unreservedly on His mercy and trust Him for all.