The unanimous teaching of the entire Bible is that we are saved by grace through faith in God's promises. There was never a time when anybody was expected to merit God's favor. We are not saved by good works, but we are saved to good works (Eph. 2:1-10), and it the Holy Spirit who works in us the "obedience of faith" (Rom. 1:5 & 16:25-27). It is the Holy Spirit who empowers "every work of faith" (2 Thess. 1:11) and produces the fruit of living faith in the lives of those vitally connected to Christ (John 15; Gal. 5:16-25).
Calvin and many other reformers explained the biblical doctrine of a two-fold justification. We are initially justified by grace alone through faith alone in Christ alone. Works have absolutely nothing to do with this sovereign act of grace by which we are put into right standing with God. The Father accepts us only because He imputes our sin to Christ's account and Christ's righteousness to our account (2 Cor. 5:21). This "initial justification" is simply the Father's acceptance of Christ's work for us and the divine verdict that we are forgiven and brought into the covenant people of God.
Based on and flowing out of this initial justification is God's acceptance of our works. This is the "Well done, thou good and faithful servant" that we all long to hear (cf. Matt. 25:31-46; John 5:26-29; Rom. 2:6-13; 2 Cor. 5:9-10). This is the Father's approval of our works, which are the fruit of living faith. This "final justification" is the Father's approval of the Spirit's work in us. The Holy Spirit progressively sanctifies the justified people of God over the course of their lives, and the Father looks favorably upon the work that His Spirit has accomplished in us by the means of grace.
Our works are not acceptable to God before we are justified by God's free grace, but God's justification of us makes our works acceptable to Him because they begin to flow from living faith. Addressing this issue in his Institutes of the Christian Religion (3.17.5), John Calvin put it this way: "This is the "acceptance" which Peter mentions [Acts 10:34; cf. 1 Pt. 1:17] whereby believers are, after their call, approved of God also in respect of works [cf. 1 Pt. 2:5]. For the Lord cannot fail to love and embrace the good things he works in them through his Spirit. But we must always remember that God "accepts" believers by reason of works only because he is their source and graciously, by way of adding to his liberality, deigns also to show "acceptance" toward the good works he has himself bestowed."