Pathogens play an important part in shaping the structure and dynamics of natural communities, because species are not affected by them equally. A shared goal of ecology and epidemiology is to predict when a species is most vulnerable to disease. A leading hypothesis asserts that the impact of disease should increase with host abundance, producing a 'rare-species advantage'. However, the impact of a pathogen may be decoupled from host abundance, because most pathogens infect more than one species, leading to pathogen spillover onto closely related species. Here we show that the phylogenetic and ecological structure of the surrounding community can be important predictors of disease pressure. We found that the amount of tissue lost to disease increased with the relative abundance of a species across a grassland plant community, and that this rare-species advantage had an additional phylogenetic component: disease pressure was stronger on species with many close relatives. We used a global model of pathogen sharing as a function of relatedness between hosts, which provided a robust predictor of relative disease pressure at the local scale. In our grassland, the total amount of disease was most accurately explained not by the abundance of the focal host alone, but by the abundance of all species in the community weighted by their phylogenetic distance to the host. Furthermore, the model strongly predicted observed disease pressure for 44 novel host species we introduced experimentally to our study site, providing evidence for a mechanism to explain why phylogenetically rare species are more likely to become invasive when introduced. Our results demonstrate how the phylogenetic and ecological structure of communities can have a key role in disease dynamics, with implications for the maintenance of biodiversity, biotic resistance against introduced weeds, and the success of managed plants in agriculture and forestry.