On one level, it was the Reformers misunderstanding of this passage (especially verse 28) and similar passages that fueled the Reformation and undergirds much of what Protestant Christians believe today. The main mistaken premise here is that Paul's reference to "works" or "works of the Law" refer to good works in the sense of moral actions, when in fact it has been shown by scholars (Catholic, Jewish and Protestant) that by this term Paul and his contemporaries instead used this term exclusively to refer to the ritual and purity prescriptions of the Torah (the first five books of the Jewish Scriptures). This colors a Christian's entire understanding of Paul's writings and, by extension, what one believes about how one is saved. The Catholic understanding dovetails perfectly with the rest of Scripture, especially James chapter 2 where we are told that "we are not saved by faith alone" and "faith without works is dead."
Anyway, the Navarre Bible commentary on this passage has an excellent summation of official Catholic teaching on salvation as it relates to Romans. Many Protestants will be surprised that they will find much to agree with here, and even that they may be misinformed as to what the Catholic Church believes about salvation and answer the question: "What must I do to be saved?"
What follows is the passage from Romans and then the Navarre Commentary:
From: Romans 3:21-30
Righteousness, a Free Gift through Faith in Christ
 But now the righteousness of God has been manifested apart from law, although the law and the prophets bear witness to it,  the righteousness of God through faith in Jesus Christ for all who believe. For there is no distinction  since all have sinned and fall short of the glory of God,  they are justified by his grace as a gift, through the redemption which is in Christ Jesus,  whom God put forward as an expiation by his blood, to be received by faith. This was to show God's righteousness, because in his divine forbearance he had passed over former sins;  it was to prove at the present time that he himself is righteous and that he justifies him who has faith in Jesus.
 Then what becomes of our boasting? It is excluded. On what principle? On the principle of works? No, but on the principle of faith.  For we hold that a man is justified by faith apart from works of law.  0r is God the God of Jews only? Is he not the God of Gentiles also? Yes, of Gentiles also,  since God is one; and he will justify the circumcised on the ground of their faith and the uncircumcised through their faith.
21-22. The doctrinal richness of this text and of the whole passage (vv. 21-26) is here condensed in a way very typical of St Paul's style. He explains how justification operates: God the Father, the source of all good, by his redemptive decree is the "efficient cause" of our salvation; Jesus Christ, by shedding his blood on the Cross, merits this salvation for us; faith is the instrument by which the Redemption becomes effective in the individual person.
The righteousness of God is the action by which God makes people righteous, or just (cf. St Augustine, "De Spiritu Et Littera", IX, 15). This righteousness was originally proclaimed in the books of the Old Testament--the Law and the Prophets--but it has now been made manifest in Christ and in the Gospel. Salvation does not depend on fulfillment of the Mosaic Law, for that Law is not sufficient to justify anyone: only faith in Jesus Christ can work salvation.
"If anyone says that, without divine grace through Jesus Christ, man can be justified before God by his own works, whether they were done by his natural powers or by the light of the teaching of the Law: let him be anathema" (Council of Trent, "De Iustificatione", can. 1).
It is not the law, then, which saves, but "faith in Jesus Christ". This expression should be interpreted in line with the unanimous and constant teaching of the Church, which is that "faith is the beginning of human salvation", and a person's will must cooperate with faith to prepare the ground for the grace of justification (cf. ibid., chap. 8 and can. 9).
23-26. The Apostle first describes the elements that go to make up themystery of faith (vv. 23-25): all men need to be liberated from sin; God the Father has a redemptive plan, which is carried out by the atoning and bloody sacrifice of Christ's death; faith is a necessary condition for sharing in the Redemption wrought by Christ; the sacrifice of the Cross is part and parcel of the History of Salvation: before the Incarnation of the Word, God patiently put up with men's sins; in the fullness of time he chose--through Christ's sacrifice--to require full satisfaction for those sins so that men might be enabled to become truly righteous in God's eyes and God's perfections become more manifest.
"The Cross of Christ, on which the Son, consubstantial with the Father,renders full justice to God, is also a radical revelation of mercy, that is, of the love that goes against what constitutes the very root of evil in the history of man--against sin and death" (John Paul II, "Dives In Misericordia", 8).
23. "Fall short of the glory of God": this shows the position man is in when he is in a state of sin. Because he has not the life of grace in him, he is not properly orientated towards his supernatural end, is deprived of the right to heaven that sanctifying grace confers, and consequently does not have these divine perfections which supernatural life gives him.
24. All have been justified, that is, all have been made "righteous" (cf. 1 :17). This justification is the result of a gratuitous gift of God which St Paul describes in a way which reinforces his point ("grace", "as a gift"): this identifies the source of the gift as God's loving-kindness and it also shows the new state in which justification places a person so important is this statement--that grace is a gift which God gives without merit on our part--that the Council of Trent, when using this text from St Paul, made a point of explaining what it meant: that is, that nothing which precedes justification (whether it be faith, or morals) merits the grace by which man is justified (cf. Rom 11:16; Council of Trent, "De Iustificatione", chap. 8).
This new kind of life, whose motor is grace, requires free and active cooperation on man's part; by that cooperation a person in the state of grace obtains merit through his actions: "For such is God's goodness to men that he wills that his gifts be our merits, and that he will grant us an eternal reward for what he has given us" ("Indiculus", chap. 9). The fact that grace is a gratuitous gift of God does not mean that man does not have an obligation to respond to it: we are not justified by keeping the Law or by a decision of our free will; however, justification does not happen without our cooperation; grace strengthens our will and helps it freely to keep the Law (cf. St Augustine, "De Spiritu Et Littera", IX, 15).
Justification by grace is attained "through the redemption which is in Jesus Christ". The Council of Trent teaches that when a sinner is justified there is "a passing from the state in which man is born a son of the first Adam, to the state of grace and adoption as sons of God through the second Adam, Jesus Christ our Savior" ("De Iustificatione", chap. 4). This has been made possible because our Lord saved us by giving himself up as our ransom. The Greek word translated as "redemption" refers to the ransom money paid to free a person from slavery. Christ has freed us from the slavery of sin, paying the necessary ransom (cf. Rom 6:23). By sacrificing himself for us, Christ has become our master or owner, who mediates between the Father and the whole human race: "Let us all take refuge in Christ; let us have recourse to God to free us from sin: let us put ourselves up for sale in order to be redeemed by his blood. For the Lord says, 'You were sold for nothing, and you shall be redeemed without money' (Is 52:3); without spending a penny of your inheritance, for I have paid on your behalf. This is what the Lord says: He paid the price, not with silver but with his blood" (St Augustine, "In Ioann. Evang.", 41, 4).
Our very creation means that we belong totally to God the Father andtherefore also to Christ, insofar as he is God, but "as man, he is also for many reasons appropriately called 'Lord'. First, because he is our Redeemer, who delivered us from sin, he deservedly acquired the power by which he truly is and is called our Lord" ("St Pius V Catechism", I, 3, 11).
And so, through the Incarnation, whose climax was Christ's redemptive sacrifice, "God gave human life the dimension that he intended man to have from his first beginning; he has granted that dimension definitively [...] and he has granted it also with the bounty that enables us, in considering the original sin and the whole history of the sins of humanity, and in considering the errors of the human intellect, will and heart, to repeat with amazement the words of the sacred Liturgy: 'O happy fault...which gained us so great a Redeemer!'"(John Paul II, "Redemptor Hominis", 1).
25. The "expiation" was the cover or mercy seat of the Ark, which stood in the center of the Holy of Holies in the Temple (cf. Exod 25:17-22). It was made of beaten gold and had a cherub at either end, each facing the other. It had two functions: one was to act as God's throne (cf. Ps 80:2; 99:1), from which he spoke to Moses during the time of the exodus from Egypt (cf. Num 7:89; Exod 37:6); the other was to entreat God to pardon sin through a rite of expiatory sacrifice on the feast of the Day of Atonement (cf. Lev 16): on that day the High Priest sprinkled the mercy seat with the blood of animals sacrificed as victims, to obtain forgiveness of sins for priest and people.
St Paul asserts that God has established Jesus as the true expiation, of which the mercy seat in the Old Testament was merely a figure.
No angel or man could ever atone for the immense evil that sin is--an offense to the infinite majesty of God. The Blessed Trinity decided "that the Son of God, whose power is infinite, clothed in the weakness of our flesh, should remove the infinite weight of sin and reconcile us to God in his Blood" ("St Pius V Catechism", I, 3, 3).
This expiatory sacrifice, prefigured in the bloody sacrificial rites of the Old Testament (cf. Lev 16:1 ff), was announced by John the Baptist when he pointed to Jesus as the Lamb of God (cf. Jn 1:29 and note); and Jesus himself referred to the sacrifice of the Cross when he said that the Son of man had come "to give his life as a ransom for many" (Mt 20:28).
This sacrifice is renewed daily in the Holy Mass, one of the purposes of which is atonement, as the Liturgy itself states: "Lord, may this sacrifice once offered on the cross to take away the sins of the world now free us from our sins" ("Roman Missal", Feast of the Triumph of the Cross, prayer over the gifts).
26. In the time prior to Christ's coming the sins of mankind remained unatoned for: neither the rites designed by man to placate God's anger, nor those established by God himself in the Old Law, were in any way equal to atoning for the offense offered to God by sin. Therefore, the just of the Old Testament were really justified by virtue of their faith in the future Messiah, a faith which expressed itself in observance of the rites established by God.
During all this period the Lord kept deferring punishment ("passing over former sins"). This time of "God's forbearance" lasted until the messianic era "the present time", that is, the period between the first and second comings of Christ. On the righteousness of God and God as the Justifier of man, see note on Rom 1:17.
27-31. These words are addressed to the same imaginary interlocutor as appeared at the beginning of the chapter. Although he is Lord of all nations, God showed special preference for the people of Israel. Relying on this, the Jews wrongly thought that only they could attain blessedness because only they enjoyed God's favor. This led them to look down on other peoples. After the coming of Christ, they no longer have any basis for this pride: St John Chrysostom explains that it had simply become outdated, superseded (cf. "Hom. On Rom", 7), for God had set up a single way of salvation for all men--the "principle of faith" which the Apostle refers to. This new way means that Jews must forget their ancient pride and become humble, for God has opened the gates of salvation to all mankind.
Consequently, no one--not even the Jew--is justified by works of the Law. What justifies a person is faith: not faith alone, as Luther wrongly argued, but the faith which works through charity (cf. Gal 5:6); faith which is not presumptuous self-confidence in one's own merits, but a firm and ready acceptance of all that God has revealed, faith which moves one to place one's hope in Christ's merits and to repent of one's sins. Therefore it will be "by faith"--not by circumcision--that the Jews will be justified, and it will be "through their faith" that the uncircumcised will attain salvation. From this it might appear as though the Law had been revoked; but that is not the case: faith ratifies the Law gives it its true meaning and raises it to perfection. For, through being a preparation for the Gospel, the Mosaic Law receives from Christ the fullness it was lacking: the precept of charity reveals the meaning which God gave the law but which lay hidden until Christ made it manifest, for "love is the fulfilling of the law" (Rom 13:10). St Paul in a way summarizes all this teaching in v. 28, which is the key statement in the passage.
For more information, see my previous post, How Are We saved?