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. (Rom 2:14)
In the first chapter to the Romans Paul gives a rather detailed account regarding the consequences of the fall. He says that God gave man up to a debased mind so that the evil of the old nature could be evident to all creation. In chapter three Paul continues his exposition by stating that none is righteous, no one does good. Man is corrupt and is in a dire need for salvation and a new nature wherein the law is written on the heart.
So when Paul in the verse quoted gives this reference to Gentiles who by nature do what the law requires he must be talking about regenerated Gentiles. How this has happened we don’t know. Whether they have heard the gospel or in any other way have received faith in God is impossible to say. However, what Paul says is that they effortlessly are a law in themselves because they have received a new heart. Initially the Gentiles were foreigners to the covenants of the promise (Eph 2:12). They were excluded from citizenship in Israel. Hence they were never subject to the law.
Even though they do not have the law they do what the law requires due to their new nature, which Paul in his epistle to the Colossians explicit attaches to the fact that Christ is in the believer. Paul observes: “No, a man is a Jew if he is one inwardly; and circumcision is circumcision of the heart, by the Spirit, not by the written code. Such a man’s praise is not from men, but from God.” (Rom 2:29)
This is the basics of the new covenant. The law is obsolete because it couldn’t lead any man to righteousness before God. The surpassing glory of the New Covenant is that God has written His statutes on hearts of flesh so that every man becomes a law to himself effortlessly expressing his new nature as a son of the Most High.
God is not limited by any written code. He is life and life in abundance. In His state of absolute emancipation He is free to express Himself through love which always seeks the best of others. The scriptures say that God cannot lie. He has “chosen” to be self for others love, therein lies His liberty, because love always seeks expansion. Love isn’t static. It pulsates with a brilliance too magnificent for the human mind. This pulsating power is now permeating every regenerated man so that this inner law will come to expression insofar man has abandoned any restraining outer written code.