Eco-evolutionary theory argues that population cycles in consumer-resource interactions are partly driven by natural selection, such that changes in densities and changes in trait values are mutually reinforcing. Evidence that this theory explains cycles in nature, however, is almost nonexistent. Experimental tests of model predictions are almost always impossible because of the long time scales over which cycles occur, but for most organisms, even tests of model assumptions are logistically impractical. For insect baculoviruses in contrast, tests of model assumptions are straightforward, and baculoviruses often drive outbreaks of forest-defoliating insects, as in the gypsy moth that we study here. We therefore used field experiments with the gypsy moth baculovirus to test two key assumptions of eco-evolutionary models of host-pathogen population cycles, that reduced host infection risk is heritable and costly. Our experiments confirm the two assumptions, and inserting parameters estimated from our data into the models gives cycles closely resembling gypsy moth outbreak cycles in North America, whereas standard models predict unrealistic stable equilibria. Our work shows that eco-evolutionary models are useful for explaining outbreaks of forest insect defoliators, while widespread observations of intense selection imposed by natural enemies on defoliators, and frequent laboratory observations of heritable and costly resistance in defoliators, suggest that eco-evolutionary dynamics may play a general role in defoliator outbreaks.