The gemara discusses the din of קנאין פוגעין בו and its parameters. Although the gemara doesn't identify the source of the heter, Rashi in the mishna 81b and the Rambam (Hil. Issurei Biah 12:4) both write that it is a halacha l'moshe m'sinai. The gemara itself hints to this (82a bottom) that Pinchas recalled this as a halacha that Moshe taught him after descending from Har Sinai. However, the halacha l'moshe misinai seems to only be a heter to kill the Jew who violated the chilul Hashem of publicly having relations with the goy. Actually, Pinchas was only allowed to kill Zimri without consulting his Rebbi, Moshe, because it was a situation of chilul hashem (as rashi explains d.h. shmuel - שכל מקום שיש חילול השם אין חולקין כבוד לרב לפיכך הורה בנחס הלבה בפני רבו ולא המתין ליטול רשות ממשה, שלא יראו הרואים וילמדו להתיר את כותית). But, what is the heter to kill kazbi (the non-jewish woman)?
Rav Moshe (Igros Moshe, Even Ha'Ezer 1:38/39) discusses this question. In a teshuva to his eldest son in law, Rav Shisgal, he explains based on the Rambam (Hil. Issurei Biah 12:10) who writes:
אבל ישראל הבא על הכותית וכו' כיון שבא על הכותית בזדון הרי זה נהרגת מפני שבא לישראל תקלה על ידיה כבהמה, ודבר זה מפורש בתורה שנאמר "הן הנה היו לבני ישראל בדבר בלעם וכל אשה יודעת איש למשכב זכר תהרוגו - רמב"ם הל' איסורי ביאה פרק י"ב הל' י
The Rambam holds that just as an animal that was a Nirvah is killed because of the embarrassment of the Ro'veia, so too the adulterous shiktza who caused תקלה to the Jew is also killed. Rav Moshe struggles with why the Rambam has to search for a source for this din using the pasuk of b'nos midyan, and not just cite the pasuk by Pinchas where we know that he killed kazbi along with zimri. Rav Moshe understands that had the Rambam used Pinchas as a source, it would only be a heter to kill her at the time of the act, when there is a heter to kill him, but by citing a pasuk by the daughters of midyan we learn that even afterward they can be killed. Rav Moshe explains that it is possible that the adulterous woman (i..e kazbi) can be killed after the fact, even without a beis din. Rav Moshe explains that the gemara implies that the limitation of the din קנאין פוגעין בו being only at the time of the act and the din that the ka'nai is not allowed to consult with a beis din, are fundamentally connected (ולא עוד אלא שאם וכו). The fundamental connection is that the Torah has some level of compassion on the adulterer, therefore beis din won't give permission to kill him and he can only kill at the time of the act. However, the concept of kana'us would technically extend even after the act. Therefore, the gentile woman, who the Torah doesn't have the same level of compassion on, can be killed even after the act is over (under the heter of קנאין פוגעין בה and would not require a court proceeding).
Rav Moshe's approach to the Rambam leaves one aspect difficult. The language of the Rambam implies that any situation of a Jewish man having relations with a shiktza, she can be killed because of the "taka'la" she is causing him. The Rambam doesn't limit this to a public display where we apply the din of קנאין פוגעין בו, and seems to hold that it would apply to even a private relationship. Rav Moshe who understands that the basis for the heter to kill her is also קנאין פוגעין בה because he holds it can be done even without a beis din, is forced to say that she is only allowed to be killed when done publicly, not privately. Limiting the ability to kill her after the fact to a situation where the aveira was done publicly is against the simple reading of the Rambam? Perhaps we can explain based on the Nimukei Yosef that I mentioned yesterday on this blog, that the din קנאין פוגעין בו when done in public, is indicative of the severity of the aveira even when done in private (יהרג ואל יעבור). Therefore, if we are able to kill her when it is done in public because of the "taka'la" she caused, similar to the animal that is killed, she can even be killed based on this rationale when the aveira was done in private.