What does Romans 2:16 mean?
Paul has divided humanity into two groups: those who have sinned under the law—the Israelites, or "the Jews"—and those who have sinned without being under the law—which is everyone else. Those who sin under the law will be judged by the law. However, Paul has written in the previous verses, even Gentiles might keep some parts of the law just by listening to their own consciences. After all, the same God who gave the law to Israel built into human beings a sense of right and wrong. There is no third category: all people fall short of God's standard of perfection (Romans 3:9–10).Now Paul refers to the day when God will judge the "secrets of men by Jesus Christ." At that judgment, Paul suggested in the previous verse, our consciences will stand as a witness in regard to what we have done, right or wrong. God's judgment of Gentiles, in other words, will be as fair and consistent as His judgment of Jewish individuals who have lived under the law of Moses. Sin is sin, whether we have been given an explicit list or not.
Paul writes that, according to his gospel—the gospel of Jesus Christ—this will include a judgment of the "hidden things" of people. God will judge thoughts and secrets, as well as actions. Also, this judgment will be by Jesus Christ. He will stand as judge in this moment (John 5:22–27; Hebrews 4:13).
Again, we see the larger point Paul is coming to: nobody, whether Jew or Gentile, will be shown to be righteous at the judgment based on their own good works. Only in Christ, by grace and through faith, will anyone be declared righteous and given eternal life.