Glycosyltransferases (GTs) control the synthesis and structures of glycans. Inactivation and intense allelic variation in members of the GT6 family generate species-specific and individual variations in carbohydrate structures, including histoblood group oligosaccharides, resulting in anti-glycan antibodies that target glycan-decorated pathogens. GT6 genes are ubiquitous in vertebrates but are otherwise rare, existing in a few bacteria, one protozoan, and cyanophages, suggesting lateral gene transfer. Prokaryotic GT6 genes correspond to one exon of vertebrate genes, yet their translated protein sequences are strikingly similar. Bacterial and phage GT6 genes influence the surface chemistry of bacteria, affecting their interactions, including those with vertebrate hosts.