Although the importance of plant-associated microbes is increasingly recognized, little is known about the biotic and abiotic factors that determine the composition of that microbiome. We examined the influence of plant genetic variation, and two stressors, one biotic and one abiotic, on the ectomycorrhizal (EM) fungal community of a dominant tree species, Pinus edulis. During three periods across 16 years that varied in drought severity, we sampled the EM fungal communities of a wild stand of P. edulis in which genetically based resistance and susceptibility to insect herbivory was linked with drought tolerance and the abundance of competing shrubs. We found that the EM fungal communities of insect-susceptible trees remained relatively constant as climate dried, while those of insect-resistant trees shifted significantly, providing evidence of a genotype by environment interaction. Shrub removal altered the EM fungal communities of insect-resistant trees, but not insect-susceptible trees, also a genotype by environment interaction. The change in the EM fungal community of insect-resistant trees following shrub removal was associated with greater shoot growth, evidence of competitive release. However, shrub removal had a 7-fold greater positive effect on the shoot growth of insect-susceptible trees than insect-resistant trees when shrub density was taken into account. Insect-susceptible trees had higher growth than insect-resistant trees, consistent with the hypothesis that the EM fungi associated with susceptible trees were superior mutualists. These complex, genetic-based interactions among species (tree-shrub-herbivore-fungus) argue that the ultimate impacts of climate change are both ecological and evolutionary.