When Paul says, in Ephesians 2:8-9, “not of yourselves; it is the gift of God” and “not of works, lest anyone should boast,” and does so in contrast with salvation “by grace through faith,” he is referring to man’s performance under a system of justification by perfect law-keeping (viz., the deeds, works, or works of law which we, as creatures, have failed to perform perfectly). Having been saved by grace through faith, but not at the point of faith, as many have mistakenly thought, one is able to do, according to Ephesians 2:10, those “good works” which the Father “beforehand” created us in Christ Jesus to do.
These good works are prescribed by the law-code we are obligated to obey “under law to Christ.” These good works are the very same works that James says are done by those who Paul said, and James agrees, are saved by grace through faith. These “good works,” as Paul referred to them, or “works,” as James called them, are not done in order to be saved. Instead, they are works to be done by those who are, and remain, saved.
However, if a Christian refused to do these good works (works he is obligated to do in his Creator-creature relationship), he would no longer be walking in the light and, as such, would no longer have access to God’s grace through the precious blood of Jesus Christ (1 Jn. 1:5-9). At the same time, and some just can’t seem to get their minds wrapped around this point, for the one doing these good works of the law-code (a law-code that can no longer save because all are sinners), there are, and remain, conditions of grace which must be obeyed. Without obedience to these grace conditions, one simply cannot be, nor remain, saved/justified. This means that these grace conditions, contrary to law conditions, are things (or works) we must do in order to access the grace available to us through the Lord’s sacrifice. It is in this way (i.e., by these grace conditions) that we ARE (by believing, repenting, confessing, and being baptized) and REMAIN (by continuing to believe, repent, and confess Jesus as Lord) saved.