Specific interactions between parasite genotypes and host genotypes (Gp × Gh) are commonly found in invertebrate systems, but are largely lacking a mechanistic explanation. The genotype of invertebrate hosts can be complemented by the genomes of microorganisms living on or within the host (‘microbiota’). We investigated whether the bacterial gut microbiota of bumble bees (Bombus terrestris) can account for the specificity of interactions between individuals from different colonies (previously taken as host genotype proxy) and genotypes of the parasite Crithidia bombi. For this, we transplanted the microbiota between individuals of six colonies. Both the general infection load and the specific success of different C. bombi genotypes were mostly driven by the microbiota, rather than by worker genotype. Variation in gut microbiota can therefore be responsible for specific immune phenotypes and the evolution of gut parasites may be driven by interactions with ‘microbiota types’ as well as with host genotypes.