I would suggest to you that the law the Gentiles did not have is the law of Moses. When Paul refers to works of the law, he is talking about the law of Moses. It might be easier to see in Galatians.
Gal. 3:10 For all who rely on the works of the law are under a curse, as it is written: “Cursed is everyone who does not continue to do everything written in the Book of the Law.”
So he is contrasting the law of Moses with the law of faith.
3:11 Clearly no one who relies on the law is justified before God, because “the righteous will live by faith.” 12The law is not based on faith; on the contrary, it says, “The person who does these things will live by them.”
It becomes even clearer that the law Paul is referring to is the Mosacial law when he says it appeared 430 years after the Promise God made to Abraham.
3:17 What I mean is this: The law, introduced 430 years later, does not set aside the covenant previously established by God and thus do away with the promise. 18 For if the inheritance depends on the law, then it no longer depends on the promise; but God in his grace gave it to Abraham through a promise.
He later tells them that if you want to be justified by the law (Mosaical) then they have fallen from grace.
Gal. 5:3 Again I declare to every man who lets himself be circumcised that he is obligated to obey the whole law. 4 You who are trying to be justified by the law have been alienated from Christ; you have fallen away from grace.