In English, “Gentile” usually refers to a person from a nation other than Israel (although some people use it to refer to people of a different religion to themselves). Because the Bible is a translation from other languages, and because it was written over a long period of time, when the word “Gentile” occurs in the Bible the story is a little more complicated.
In the Old Testament, “Gentiles” occurs 30 times in the KJV (but much less often in most modern translations) and is always a translation of goy (plural goyim). The Hebrew word occurs 559 times and it is translated (in the KJV) as nations (266x), heathen (143x), nation (109x), gentiles (30x) or people (11x). So primarily the word goy means nation or people. It is used of Israel in some passages; for example, when God promised Abraham (Genesis 12:2) that his descendants would form a “great nation”, the Hebrew phrase is goy gadol. Another example is Genesis 25:23. Over time, the word changed its meaning slightly and the later books of the Old Testament tend to apply the word only to other nations, not to Israel. By Roman times (and so New Testament times), the word goy had come to exclusively mean a non-Jewish nation. The word continued to evolve, and came to be applied to an individual belonging to a non-Jewish nation, which is how it is used in modern Hebrew and Yiddish.
In the New Testament, “Gentile” or “Gentiles” occurs 93 times in the KJV (and about the same number in most modern translations). It is usually a translation of the Greek word ethnos which is also translated (in the KJV) as nations, nation, heathen and people. Jesus uses it specifically of non-Jewish nations in Matthew 10:5:
These twelve Jesus sent out, instructing them, “Go nowhere among the Gentiles (ethnos) and enter no town of the Samaritans, but go rather to the lost sheep of the house of Israel.
However, in Luke 7:5, the word is used of the nation of Israel:
… for he loves our nation (ethnos), and he is the one who built us our synagogue.”
Fortunately, it is always clear from the context whether the nation referred to is Israel or the non-Jewish nations. The English translations of the Bible have clarified the meaning by using “Gentile” whenever it is clear that non-Jewish nations are intended.