The most prevalent microbial eukaryote in the human gut is Blastocystis, an obligate commensal protist also common in many other vertebrates. Blastocystis is descended from free-living stramenopile ancestors; how it has adapted to thrive within humans and a wide range of hosts is unclear. Here, we cultivated six Blastocystis strains spanning the diversity of the genus and generated highly contiguous, annotated genomes with long-read DNA-seq, Hi-C, and RNA-seq. Comparative genomics between these strains and two closely related stramenopiles with different lifestyles, the lizard gut symbiont Proteromonas lacertae and the free-living marine flagellate Cafeteria burkhardae, reveal the evolutionary history of the Blastocystis genus. We find substantial gene content variability between Blastocystis strains. Blastocystis isolated from an herbivorous tortoise has many plant carbohydrate metabolizing enzymes, some horizontally acquired from bacteria, likely reflecting fermentation within the host gut. In contrast, human-isolated Blastocystis have gained many heat shock proteins, and we find numerous subtype-specific expansions of host-interfacing genes, including cell adhesion and cell surface glycan genes. In addition, we observe that human-isolated Blastocystis have substantial changes in gene structure, including shortened introns and intergenic regions, as well as genes lacking canonical termination codons. Finally, our data indicate that the common ancestor of Blastocystis lost nearly all ancestral genes for heterokont flagella morphology, including cilia proteins, microtubule motor proteins, and ion channel proteins. Together, these findings underscore the huge functional variability within the Blastocystis genus and provide candidate genes for the adaptations these lineages have undergone to thrive in the gut microbiomes of diverse vertebrates.