Psalms 24:3-5 KJV
Who shall ascend into the hill of the LORD? or who shall stand in his holy place? (4) He that hath clean hands, and a pure heart; who hath not lifted up his soul unto vanity, nor sworn deceitfully. (5) He shall receive the blessing from the LORD, and righteousness from the God of his salvation.
A problem appears after verses 3 and 4 of this text. A question is presented to which the answer must be, 'no one'. There is none righteous, no, not one. The Bible makes this very clear in many places; Psalm 14, Psalm 53, and Romans 3 for example. So how can anyone ascend into the hill of the LORD? How can any of us stand in HIS holy place? GOD cannot even look upon us in our sins (Habakkuk 1:13). And far from making us righteous, our "good" works are actually as sinful as our sin (Isaiah 64:6). This is why Paul writes in Ephesians 2:9 that salvation is "not by works".
We must have perfect righteousness to enter into GOD's presence. No man born in sin can ever produce even one iota of righteousness, much less enough to save himself. Therefore, if anyone is to be saved, they must receive righteousness from GOD.
This is the meaning of verse 5: the one who can stand in GOD's presence has been given righteousness; he has received it from the GOD of his salvation! It is a blessing, a gift of free grace from the LORD.
In the gospel of Jesus Christ the righteousness of GOD is revealed, and it is by faith alone (Romans 1:16-17, 3:21-22). CHRIST died to pay the penalty for our sin, and HE also lived a perfect life, sinless in every way, so that HE could give us the righteousness that HE earned. With the righteousness of Jesus Christ, we can stand in GOD's presence. As Romans 5:19 says, "by the obedience of one shall many be made righteous".
This is the gift, that GOD would take the sin of wicked men and put it onto HIS own Son, and then in return take the righteousness of HIS Son, and give it freely to undeserving men. In HIS mercy, GOD declares men to be righteous by giving them the righteousness of the Lord Jesus.
2 Corinthians 9:15 KJV
Thanks be unto God for his unspeakable gift.