The Torah source for the prohibition is Devarim 7:3-4, which forbids giving one's children in marriage to the seven Canaanite nations because such unions will turn the heart away from God, and Kiddushin 68b:2-3 learns from this pasuk that betrothal with a gentile woman simply does not take effect, with offspring from her following her own status rather than the father's.
Avodah Zarah 36b:4-6 clarifies that the Biblical prohibition of marrying into the nations applies to the seven nations, while the extension to all other nations is a later rabbinic decree, and this same source distinguishes marriage-style relations (forbidden min haTorah) from licentious relations (forbidden derabbanan).
Sanhedrin 82a:4 states that one who has relations with a gentile woman is considered as if he has intermarried with idolatry itself, and reports that the court of the Hasmoneans further decreed liability under the categories of nidah, shifcha, goyah, and zonah/eishet ish.
Mishneh Torah, Forbidden Intercourse 12:6-8 and Malachi 2:11-12 teach that one who is not stopped by zealots or lashed by the court for this sin is nonetheless liable to karet, deriving this from the prophet's rebuke that Judah has profaned what is holy to God by espousing the daughter of a foreign god; Sefer HaMitzvot, Negative Commandments 52 codifies this same graduated structure of zealotry, lashes, and karet.
Mishneh Torah, Marriage 4:15 rules as a matter of halachic effect that betrothal to a gentile woman or maidservant does not take hold at all, so she remains in her prior status, unlike an apostate Jew's betrothal which remains fully binding.
Shulchan Arukh, Even HaEzer 16:1-2 and Arukh HaShulchan, Even HaEzer 16:1-5 codify the lashes for relations derech ishut and the lesser rabbinic penalty for relations derech zenut, tying the Biblical scope of the prohibition to the pasuk 'lo titchaten bam,' while noting that the Rambam's own position—that the pasuk applies even to the other nations and not only the seven—is disputed among the Rishonim, as Radak also affirms that the prohibition on intermarriage applies broadly and not only to the seven nations in their unconverted state.
Nechemiah 13:23-27 and Ezra 9:1-2 record the Biblical narrative of communal crisis when Jews married Ashdodite, Ammonite, and Moabite women, with Nechemiah censuring, cursing, and even striking offenders and invoking the prohibition directly; Sefer HaChinukh 427:1-2 and Abarbanel on Melachim I 3:1 likewise affirm that the prohibition covers marriage to idolaters generally, following the Rambam's formulation.
Sefer HaMitzvot, Negative Commandments 53 records a distinct, separate prohibition specifically against marrying male Ammonite and Moabite converts to a Jewish woman, with lashes for both parties, apart from the general intermarriage prohibition.
Shulchan Arukh, Even HaEzer 11:5-6 addresses the case where a man is suspected of relations with a maidservant or non-Jewish woman who later converts: he may not then marry her, but if he does marry her he need not divorce her, and a similar after-the-fact leniency applies to a Cuthite or slave who had relations with a Jewish daughter and later converts or is freed.
Melammed Lehoil Part III 8:2-4 considers the relative severity of a kohen marrying a convert versus marrying a non-Jewish woman, concluding that intermarriage with a non-Jewish woman is the more severe transgression, carrying Biblical-level liability including karet, so that converting the woman—despite concerns about conversion motives—is preferable to leaving the couple in that situation.
Responsa Benei Banim, Volume II 31:4-5 addresses a couple already civilly married where the non-Jewish wife became pregnant and then converted, ruling that a proper chuppah and kiddushin should be arranged immediately so the couple not continue living together in a state of prohibition.
Several twentieth-century poskim take up the specific, recurring case of a couple who lived together or had a child while the woman was still non-Jewish and she subsequently converts, debating whether the man may then marry her under the rule against one suspected of relations with a non-Jew. Igros Moshe EH 4:47 considers whether such a man may marry the convert given that he had already resolved to convert her, and Igros Moshe EH 1:27 separately takes up the case of a man who lived publicly with a non-Jewish woman for years and had a son with her before her conversion. Maayan Omer 8:3:42 permits the couple to marry after her conversion and observance of mitzvot, relying on the view that a conversion motivated initially by the relationship can still be valid, while noting the marriage is discouraged at the outset due to public suspicion though not dissolved once performed. Heichal Yitzchak EH 1:19 examines a related question of whether a woman who had relations with a non-Jew before converting is thereby a zonah forbidden to a kohen, distinguishing relations derech zenut from relations within marriage. Tzitz Eliezer 10:25 addresses a related historical claim, stating there is no basis to suspect that certain people eventually married non-Jewish women because they were known to be careful not to marry into another nation.
Related discussions address the practical boundaries around such relationships even short of marriage: Avnei Yashfeh 7:114 holds that a non-Jewish woman living among Jews and adopting Jewish practices is treated as an apostate for certain communal purposes but is not deemed a zonah forbidden to kohanim, Avnei Yashfeh 8:145 rules that a Jewish woman may not be secluded with a non-Jewish man even in his wife's presence, and Tzitz Eliezer 20:54 and Tzitz Eliezer 16:65 separate the question of permitting a non-Jewish woman's conversion from the distinct question of whether she may subsequently marry the Jewish man involved, treating the latter as requiring its own reliable evidentiary hearing even where conversion itself proceeds.
Contemporary Halakhic Problems, Vol II, Part II, Chapter XIII The Prohibition against Intermarriage frames intermarriage as unequivocally forbidden in Jewish law and as a matter of near-universal communal abhorrence, while noting that the precise Biblical source of the prohibition has itself been a matter of considerable discussion among the authorities.