Horizontal gene transfer (HGT) among bacteria, archaea, and viruses is widespread, but the extent of transfers from these lineages into eukaryotic organisms is contentious. Here we systematically identify hundreds of genes that were likely acquired horizontally from a variety of sources by the early-diverging fungal phyla Microsporidia and Cryptomycota. Interestingly, the Microsporidia have acquired via HGT several genes involved in nucleic acid synthesis and salvage, such as those encoding thymidine kinase (TK), cytidylate kinase, and purine nucleotide phosphorylase. We show that these HGT-derived nucleic acid synthesis genes tend to function at the interface between the metabolic networks of the host and pathogen. Thus, these genes likely play vital roles in diversifying the useable nucleic acid components available to the intracellular parasite, often through the direct capture of resources from the host. Using an in vivo viability assay, we also demonstrate that one of these genes, TK, encodes an enzyme that is capable of activating known prodrugs to their active form, which suggests a possible treatment route for microsporidiosis. We further argue that interfacial genes with well-understood activities, especially those horizontally transferred from bacteria or viruses, could provide medical treatments for microsporidian infections.