“For it is not the hearers of the law who are righteous before God, but the doers of the law who will be justified. For when Gentiles, who do not have the law, by nature do what the law requires, they are a law to themselves, even though they do not have the law. They show that the work of the law is written on their hearts, while their conscience also bears witness, and their conflicting thoughts accuse or even excuse them on that day when, according to my gospel, God judges the secrets of men by Christ Jesus.” -Romans 2:13–16
In rhetoric, we would call these lines the refutatio, a refutation of an anticipated argument against the former claim of verse 12: “For all who have sinned without the law will also perish without the law, and all who have sinned under the law will be judged by the law.”
As taught in Deuteronomy, Paul reminds his anticipated objectors that hearing the law and knowing it is not enough. And they know better. One must keep the law, obey the whole of it, to be justified.
“And now, O Israel, listen to the statutes and the rules that I am teaching you, and do them, that you may live, and go in and take possession of the land that the Lord, the God of your fathers, is giving you.” -Deuteronomy 4:1
The Gentiles, remember, don’t have a law in the same way the Jews have the law. The fact that they naturally hold similar values of justice and injustice is a law unto them. In other words, their own attitudes toward sacrilege, rebellion, murder, stealing, adultery, false witness, etc., reveal they have the law written on their hearts.
And the day is coming when God, by Jesus Christ, will judge the secrets of all men’s hearts. And just as the Gentiles will be judged in that manner, so will the Jews whose conscience also bears witness, and their conflicting thoughts accuse or even excuse them be judged on that day.
In other words, Paul is saying, all men, Jew and Gentile alike, those with the law and without the law alike, know better. They know they are sinners, rebels against God, and they know they are suppressing the truth; and, the truth they are suppressing will be revealed on Judgment Day.