Pathogens live in diverse, competitive communities, yet the processes that maintain pathogen diversity remain elusive. Here, we use a species-rich, well-studied plant virus system, the barley yellow dwarf viruses, to examine the mechanisms that regulate pathogen diversity. We empirically parameterized models of three viruses, their two aphid vectors, and one perennial grass host. We found that high densities of both aphids maximized virus diversity and that competition limited the coexistence of two closely related viruses. Even limited ability to simultaneously infect (coinfect) host individuals strongly promoted virus coexistence; preventing coinfection led to priority effects. Coinfection generated stabilizing niche differences by allowing viruses to share hosts. However, coexistence also required trade-offs between vector generalist and specialist life-history strategies. Our predicted outcomes broadly concur with previous field observations. These results show how competition within individual hosts and vectors may lead to unexpected population-level outcomes between pathogens, including coexistence, competitive exclusion, and priority effects, and how contemporary coexistence theory can help to predict these outcomes.