Predation and parasitism often regulate population dynamics, community interactions, and ecosystem functioning. The strength of these top-down pressures is variable, however, and may be influenced by both ecological and evolutionary processes. We conducted a chemostat experiment to assess the direct and indirect effects of viruses on a marine microbial food web comprised of an autotrophic host (Synechococcus) and non-target heterotrophic bacteria. Viruses dramatically altered the host population dynamics, which in turn influenced phosphorus resource availability and the stoichiometric allocation of nutrients into microbial biomass. These virus effects diminished with time, but could not be attributed to changes in the abundance or composition of heterotrophic bacteria. Instead, attenuation of the virus effects coincided with the detection of resistant host phenotypes, suggesting that rapid evolution buffered the effect of viruses on nutrient cycling. Our results demonstrate that evolutionary processes are important for community dynamics and ecosystem processes on ecologically relevant time scales.