Heritable variation in traits can have wide-ranging impacts on species interactions, but the effects that ongoing evolution has on the temporal ecological dynamics of communities are not well understood. Here, we identify three conditions that, if experimentally satisfied, support the hypothesis that evolution by natural selection can drive ecological changes in communities. These conditions are: (i) a focal population exhibits genetic variation in a trait(s), (ii) there is measurable directional selection on the trait(s), and (iii) the trait(s) under selection affects variation in a community variable(s). When these conditions are met, we expect evolution by natural selection to cause ecological changes in the community. We tested these conditions in a field experiment examining the interactions between a native plant (Oenothera biennis) and its associated arthropod community (more than 90 spp.). Oenothera biennis exhibited genetic variation in several plant traits and there was directional selection on plant biomass, life-history strategy (annual versus biennial reproduction) and herbivore resistance. Genetically based variation in biomass and life-history strategy consistently affected the abundance of common arthropod species, total arthropod abundance and arthropod species richness. Using two modelling approaches, we show that evolution by natural selection in large O. biennis populations is predicted to cause changes in the abundance of individual arthropod species, increases in the total abundance of arthropods and a decline in the number of arthropod species. In small O. biennis populations, genetic drift is predicted to swamp out the effects of selection, making the evolution of plant populations unpredictable. In short, evolution by natural selection can play an important role in affecting the dynamics of communities, but these effects depend on several ecological factors. The framework presented here is general and can be applied to other systems to examine the community-level effects of ongoing evolution.