Predicting disease risk in an era of unprecedented biodiversity and climate change is more challenging than ever, largely because when and where hosts are at greatest risk of becoming infected depends on complex relationships between hosts, parasites, and the environment. Theory predicts that host species characterized by fast-paced life-history strategies are more susceptible to infection and contribute more to transmission than their slow-paced counterparts. Hence, disease risk should increase as host community structure becomes increasingly dominated by fast-paced hosts. Theory also suggests that environmental gradients can alter disease risk, both directly, due to abiotic constraints on parasite replication and growth, and indirectly, by changing host community structure. What is more poorly understood, however, is whether environmental gradients can also alter the effect of host community structure on disease risk. We addressed these questions using a detailed survey of host communities and infection severity along a 1100m elevational gradient in southeastern Switzerland. Consistent with prior studies, increasing elevation directly reduced infection severity, which we attribute to abiotic constraints, and indirectly reduced infection severity via changes in host richness, which we attribute to encounter reduction. Communities dominated by fast pace-of-life hosts also experienced more disease. Finally, although elevation did not directly influence host community pace-of-life, the relationship between pace-of-life and disease was sensitive to elevation: increasing elevation weakened the relationship between host community pace-of-life and infection severity. This result provides the first field evidence, to our knowledge, that an environmental gradient can alter the effect of host community structure on infection severity.