The word gentile is an anglicised version of the Latin word gentilis, meaning of or belonging to a clan or tribe. In the King James Version of the Bible it is used to refer to non-Israelite tribes or nations, as an English translation of the Hebrew words goy/גוי and nochri/נכרי. It is also used to translate New Testament Greek word ethnoi. Today, the primary meaning of gentile is non-Jew.
The Latin term relates to gens (from which also derive gene, genus and genesis). The original meaning of "clan" or "family" was extended in post-Augustan Latin to acquire the wider meaning of belonging to a distinct nation or ethnicity. Later still the word came to mean "foreign," i.e. non-Roman. After the Christianization of the empire it could also be used of pagan or barbarian cultures.
In the Bible
In Saint Jerome's Latin version of the Bible, the Vulgate, gentilis was used in this wider sense, along with gentes, to translate Greek and Hebrew words with similar meanings that referred to the non-Israelite peoples.
The most important of such Hebrew words was "goyim" (singular, goy), a term with the broad meaning of "peoples" or "nations" which was sometimes used to refer to Israelites, but most commonly as a generic label for other peoples. Strongs Concordance defines goy as "nation, people usually of non-Hebrew people, or of descendants of Abraham of Israel, or of a swarm of locusts or other animals (fig.) Goyim = "nations". Strongs #1471
In the KJV Gentile is only one of several words used to translate goy or goyim. It is translated as "nation" 374 times, "heathen" 143 times, "Gentiles" 30 times, and "people" 11 times. Some of these verses, such as Genesis 12:2 and Genesis 25:23 refer to Israelites or descendants of Abraham. Other verses, such as Isaiah 2:4 and Deuteronomy 11:23 are generic references to any nation. Typically the KJV restricts the use of Gentile as a translation when the text is specifically referring to non-Israelites. For example, the only use of the word in Genesis is in chapter 10, verse 5, referring to the peopling of the world by descendents of Japheth, "By these were the isles of the Gentiles divided in their lands; every one after his tongue, after their families, in their nations."
These twelve Jesus sent forth, and commanded them, saying, Go not into the way of the Gentiles, and into any city of the Samaritans enter ye not: But go rather to the lost sheep of the house of Israel.
Here Gentiles becomes a synonym for pagan cultures of the period.
As in the King James Bible, from the 17th century onwards gentile was most commonly used to refer to non-Jews. This was in the context of European Christian societies with a Jewish minority. For this reason Gentile commonly meant persons brought up in the Christian faith, as opposed to the adherents of Judaism, and was not typically used to refer to non-Jews in non-Western cultures.