Romans 1:18 For the wrath of God is revealed from heaven against all ungodliness and unrighteousness of men, who HOLD THE TRUTH in unrighteousness:....
Romans 1:21 Because that when they KNEW GOD, they glorified Him not as God, neither were thankful; but became vain in their imaginations, and their FOOLISH HEART WAS DARKENED....
I believe Paul here is talking to the Jews, but also to anyone who has know the truth of God, and has not glorified Him in their hearts, and were not thankful, and became vain in their heart, and for such a reason, God turned them over to the lusts of their hearts.
The scripture you reference, is Paul admonishing the Romans to see how the Jews, and those who have known truth, have allowed their hearts to become darkened, and he is warning them not to become the same as the Jews, who refused to see the Messiah.
I believe he was warning them not to judge or hate the Jews, because the very same thing could happen to them, if they allowed the lusts of their hearts to dictate to them and take them in the same place of judgment that the Jews are facing.
Romans 2:3-11
3And thinkest thou this, O man, that judgest them which do such things, and doest the same, that thou shalt escape the judgment of God?
4Or despisest thou the riches of his goodness and forbearance and longsuffering; not knowing that the goodness of God leadeth thee to repentance?
5But after thy hardness and impenitent heart treasurest up unto thyself wrath against the day of wrath and revelation of the righteous judgment of God;
6Who will render to every man according to his deeds:
7To them who by patient continuance in well doing seek for glory and honour and immortality, eternal life:
8But unto them that are contentious, and do not obey the truth, but obey unrighteousness, indignation and wrath,
9Tribulation and anguish, upon every soul of man that doeth evil, of the Jew first, and also of the Gentile;
10But glory, honour, and peace, to every man that worketh good, to the Jew first, and also to the Gentile:
11For there is no respect of persons with God.