Most pathogens exist within complicated food webs of interacting hosts, vectors, competitors, and predators. Although theory has demonstrated a variety of mechanisms by which predation and competition in food webs can indirectly control infection risk in hosts, there have until now been no experimental tests of this theory. We sampled the effect of long-term exclusion of large vertebrate herbivores on the prevalence of infection by a group of aphid-vectored viruses that infect grasses (barley and cereal yellow dwarf viruses) in an oak savannah in central California. We found that pathogen prevalence was approximately 4-fold higher in the presence of consumers than in areas where they were excluded. Vertebrate consumers did not directly alter infection rates by this aphid-vectored pathogen group, but rather increased infection risk by increasing the relative abundance of highly-competent hosts in the grassland community. This large-scale experiment, measuring changes in host abundance and infection risk in response to altered consumption rates, confirms theoretical predictions that consumers can indirectly increase infection risk by altering the composition of whole communities. Most importantly, these results demonstrate that, even in complex natural communities, alterations to food web composition such as consumer invasion or extinction can lead to significant impacts that cascade throughout entire communities, including changes in infection risk.