How is God’s righteousness “revealed” in the gospel?
For I am not ashamed of the gospel, for it is the power of God for salvation to everyone who believes, to the Jew first and also to the Greek. For in it the righteousness of God is revealed from faith to faith; as it is written, “But the righteous shall live by faith”,
Romans 1:16-17 

Paul defined the gospel in 1st Corinthians 15:1-4 when he writes that it is the death, burial and resurrection of Jesus. So now the question becomes, “How is God’s righteousness revealed in the death, burial and resurrection of Jesus?” 

It is all explained in Romans 3:21-26. Here Paul says that God displayed his own son publicly as a “propitiation” (a satisfactory payment or offering) in blood, which demonstrated God’s righteousness in forgiving sin as long as there has been sin. 

So how did Jesus’ death justify God? 

Romans 6:23 reveals that “the wages of sin is death”, meaning that justice demands death for all who sin. God, however, is not willing for his people to perish needlessly, so he has historically forgiven those who put their faith in him and saved them from facing the penalty of their sin. 

God’s forgiveness, however, does not pay the debt incurred by sin. Justice would not be complete until that debt was paid in full. 

Enter the cross. Christ crucified declares God to be righteous in forgiving sin because we see him paying humanity’s sin debt through his own son. 

The wages of sin is death, and God paid this debt through Jesus for us all. Had God forgiven sin without paying the just penalty of death, he would not be just. In paying the debt for sins he forgave, however, he made it publicly and permanently clear that he did not sidestep justice in forgiving sin.

The Roman saints had connected with Jesus’ death having been buried into it through baptism according to 6:3-7. Then, as Jesus was resurrected from the tomb, they rose from the burial of baptism to walk in “newness of life”.

God not only paid the debt declaring himself righteous, but freed us from our sin, declaring us righteous as well.