The prohibition of Gentiles in the main court of the temple during the first century is well known. Paul refers to a “dividing wall” of hostility between Jews and Gentiles in Ephesians 2:15, probably an allusion to the warning to Gentiles in the Temple courts that crossing into the Court of the Men would result in their death. Paul is accused of breaking this Law by sneaking a Gentile into the Temple courts (a false charge, but it nearly cost Paul his life).
But in the Torah a Gentile was permitted to bring a sacrifice in the same way any Israelite does, presumably right to the altar of the Tabernacle (Num 15:14-16).
By the third century B.C., however, Jews began to prohibit Gentiles from entering the Temple enclosure. Antiochus III made a decree to this effect (Antiq. 12.145f) and even Herod the Great respected this when he was rebuilding the temple. Priests were trained in masonry so that they could work on the sacred areas rather than the Gentile masons Herod used elsewhere (Antiq. 15.390).
What was the basis of the exclusion of Gentiles? The practice of exclusion seems linked to the results of the Maccabean Revolt. After so much effort was expending in driving the Gentiles out of the Temple and re-dedicating it to the Lord, it would seem impure to allow any Gentile back into the holy places of the temple courts. In 1 Maccabees 14:29-36 Simon Maccabees was praised for purifying the temple from Gentile impurity.
1 Mac 14:36–37 In his days things prospered in his hands, so that the Gentiles were put out of the country, as were also those in the city of David in Jerusalem, who had built themselves a citadel from which they used to sally forth and defile the environs of the sanctuary, doing great damage to its purity. 37 He settled Jews in it and fortified it for the safety of the country and of the city, and built the walls of Jerusalem higher.
One factor bearing on this issue is the long standing Jewish belief that purity laws did not apply to Gentiles even when they lived in Israelite territory. The “sojourner laws” in Deut 5:14 define these Gentiles as resident aliens and require only a few general commands for them while they are living within the nation of Israel.
Did Jews of the first century consider Gentiles impure and therefore exclude them from the inner courts of the temple? There are several Second Temple texts which indicate eating with Gentiles was a serious problem for some (many? most?) Jews. Joseph and Asenath 7:1, “Joseph never ate with the Egyptians, for this was an abomination to him”
Jubilees 22:16 And you also, my son, Jacob, remember my words, and keep the commandments of Abraham, your father. Separate yourself from the Gentiles, and do not eat with them, and do not perform deeds like theirs. And do not become associates of theirs. Because their deeds are defiled, and all their ways are contaminated, and despicable, and abominable.
Tobit 1:10–12 (NRSV) After I was carried away captive to Assyria and came as a captive to Nineveh, everyone of my kindred and my people ate the food of the Gentiles, 11 but I kept myself from eating the food of the Gentiles. 12 Because I was mindful of God with all my heart,
Judith 12:1–2 (NRSV) Then he commanded them to bring her in where his silver dinnerware was kept, and ordered them to set a table for her with some of his own delicacies, and with some of his own wine to drink. 2 But Judith said, “I cannot partake of them, or it will be an offense; but I will have enough with the things I brought with me.”
Although Gentile exclusion was not a “core belief” of Judaism in the Second Temple period, it is clear that by the first century Judaism was not a particularly open religion nor were Gentiles welcome to participate fully in worship of the God of Israel.
Bibliography: Joseph Hellerman, “Purity and Nationalism in Second Temple Literature: 1-2 Maccabees and Jubilees” JETS 46 (2003): 401-422.