Although it is not discussed in the Torah, the Sages work under the assumption that a woman who converts is not allowed to marry a kohen. Our Gemara quotes a baraita which teaches that Rabbi Shimon bar Yohai permits a kohen to marry a giyoret (a woman who has converted) if she became Jewish when she was still a child under three years old. He bases himself on the passage (Bamidbar 31:1-20) which describes how, in the aftermath of the war of the Children of Israel against the Midianites, only the underage girls were permitted to live. (Moses was concerned that the earlier incident in which Canaanite women were used to entice the Israelite men to commit idol worship [see Bamidbar 25:1-9] would repeat itself – see Bamidbar 31:14-16.) Since we know that there were kohanim amongst the warriors, Rabbi Shimon concludes that they were allowed to marry these converts. The Hakhamim disagree, arguing that the story of the war makes no reference whatsoever to marriage and that perhaps the children were kept alive as maidservants.
In truth, the main discussion of this halakha is in the last chapter of Massekhet Kiddushin. There we find an argument among the rishonim. While Rashi and the Rambam appear to categorize a convert under the rubric of zona (see Vayikra 21:10-15), many others disagree with this suggestion, arguing that even if the woman was considered to have had a “forbidden sexual encounter” prior to her conversion, the halakha generally treats a convert as a newborn.
The alternative suggestion raised by the Ra’avad and the Rashba is that the rule forbidding a kohen to marry a convert stems from a passage in Yehezkel (44:22) where the navi states that kohanim can marry only betulot mi-zera beit Yisra’el – virgins from Jewish families. They explain that the Gemara in Kiddushin which quotes this passage apparently sees it not as a prophetic statement with no impact on the halakha, but rather as a clarification and support of the law taught in the Torah.