Paul, in his letter to the Philippian church says:
Therefore, my beloved, as you have always obeyed, so now, not only as in my presence but much more in my absence, work out your own salvation with fear and trembling, for it is God who works in you, both to will and to work for his good pleasure. Philippians 2:12-13 English Standard Version (ESV)
It is God that worketh. This is the true engine for bringing down all haughtiness — this the sword for putting an end to all pride, when we are taught that we are utterly nothing, and can do nothing, except through the grace of God alone. I mean supernatural grace, which comes forth from the spirit of regeneration.
…There are, in any action, two principal departments — the inclination, and the power to carry it into effect. Both of these he ascribes wholly to God; what more remains to us as a ground of glorying?
Nor is there any reason to doubt that this division has the same force as if Paul had expressed the whole in a single word; for the inclination is the groundwork; the accomplishment of it is the summit of the building brought to a completion. …For he does not say that our hearts are simply turned or stirred up, or that the infirmity of a good will is helped, but that a good inclination is wholly the work of God.
…For we acknowledge that we have from nature an inclination, but as it is depraved through the corruption of sin, it begins to be good only when it has been renewed by God. Nor do we say that a man does anything good without willing it, but that it is only when his inclination is regulated by the Spirit of God.
Hence, in so far as concerns this department, we see that the entire praise is ascribed to God, and that what sophists teach us is frivolous — that grace is offered to us, and placed, as it were, in the midst of us, that we may embrace it if we choose; for if God did not work in us efficaciously, he could not be said to produce in us a good inclination.
As to the second department, we must entertain the same view. “God,” says he, “is ̔Ο ἐνεργῶν το ἐνεργεῖν he that worketh in us to do.” He brings, therefore, to perfection those pious dispositions which he has implanted in us, that they may not be unproductive, as he promises by Ezekiel, —
“I will cause them to walk in my commandments.” (Ezekiel 11:20)
From this we infer that perseverance, also, is his free gift.
According to his good pleasure. …For Paul has it in view to ascribe everything to God, and to take everything from us. Accordingly, not satisfied with having assigned to God the production both of willing and of doing aright, he ascribes both to his unmerited mercy. By this means he shuts out the contrivance of the sophists as to subsequent grace, which they imagine to be the reward of merit. Hence he teaches, that the whole course of our life, if we live aright, is regulated by God, and that, too, from his unmerited goodness.
With fear and trembling. From this Paul deduces an exhortation — that they must with fear work out their own salvation. He conjoins, as he is accustomed, fear and trembling, for the sake of greater intensity, to denote — serious and anxious fear. He, accordingly, represses drowsiness as well as confidence…
The inference, also, is to be carefully observed: “You have,” says he, “all things from God; therefore be solicitous and humble.” For there is nothing that ought to train us more to modesty and fear, than our being taught, that it is by the grace of God alone that we stand, and will instantly fall down, if he even in the slightest degree withdraw his hand. Confidence in ourselves produces carelessness and arrogance.
…For distrust of ourselves leads us to lean more confidently upon the mercy of God. And this is what Paul’s words import, for he requires nothing from the Philippians, but that they submit themselves to God with true self-renunciation.
Work out your own salvation. …Salvation is taken to mean the entire course of our calling, and that this term includes all things, by which God accomplishes that perfection, to which he has predestinated us by his gracious choice. This no one will deny…
We are said to perfect it, when, under the regulation of the Spirit, we aspire after a life of blessedness. It is God that calls us, and offers to us salvation; it is our part to embrace by faith what he gives, and by obedience act suitably to his calling; but we have neither from ourselves. Hence we act only when he has prepared us for acting.
Addressing the whole issue, James wrote ironically:
But someone will say, “You have faith and I have works.” Show me your faith apart from your works, and I will show you my faith by my works. James 2:18 (ESV)
Know this then, that faith without works is dead.