For what saith the scripture? Abraham believed God, and it was counted unto him for righteousness. ~ Romans 4:3
In Romans 1:17 Paul says that the righteousness of God is revealed in the gospel of Jesus Christ, and in 3:21-26 he begins to unpack the revelation of the righteousness of God that has now been revealed through the gospel.
But now the righteousness of God without the law is manifested, being witnessed by the law and the prophets; Even the righteousness of God which is by faith of Jesus Christ unto all and upon all them that believe: for there is no difference: For all have sinned, and come short of the glory of God; Being justified freely by his grace through the redemption that is in Christ Jesus: Whom God hath set forth to be a propitiation through faith in his blood, to declare his righteousness for the remission of sins that are past, through the forbearance of God; To declare, I say, at this time his righteousness: that he might be just, and the justifier of him which believeth in Jesus. ~ Romans 3:21-26
For the rest of chapter 3 Paul continues to contend how justification is by faith and not by the works of the Mosaic law. By the time we arrive at Romans 4:3 (cited above), Paul has begun to show how righteousness was imputed to Abraham by believing God. Abraham’s faith was specifically this – He believed God!
Paul hasn’t moved on from his theme of God’s righteousness manifested through the gospel, he’s expounding on it more in detail. Believing the gospel is believing God. Believing in Jesus who died and rose again, is believing God.
What shall we say then that Abraham our father, as pertaining to the flesh, hath found?
For if Abraham were justified by works, he hath whereof to glory; but not before God. For what saith the scripture? Abraham believed God, and it was counted unto him for righteousness. Now to him that worketh is the reward not reckoned of grace, but of debt. But to him that worketh not, but believeth on him that justifieth the ungodly, his faith is counted for righteousness. Even as David also describeth the blessedness of the man, unto whom God imputeth righteousness without works, Saying, Blessed are they whose iniquities are forgiven, and whose sins are covered. Blessed is the man to whom the Lord will not impute sin. ~ Romans 4:1-8
Now consider verses 20 -25
He (Abraham) staggered not at the promise of God through unbelief; but was strong in faith, giving glory to God; And being fully persuaded that, what he had promised, he was able also to perform. And therefore it was imputed to him for righteousness. Now it was not written for his sake alone, that it was imputed to him; But for us also, to whom it shall be imputed, if we believe on him that raised up Jesus our Lord from the dead; Who was delivered for our offences, and was raised again for our justification.
Take note that Paul speaks of believing in him who raised Jesus from the dead. When we believe in Jesus (believe he died for our sins, and rose again) we are believing the testimony which God has set forth about himself in the person of his Son. And just as Abraham believed God and it was imputed to him as righteousness, even so we are justified in the sight of God and through Christ by believing the gospel, wherein the righteousness of God is revealed!
The one who has faith in Jesus believes God, just as Abraham believed God, because God’s testimony of himself is revealed in his Son.