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 the theory explains cycles in nature, however, is almost nonexistent. Experimental tests of model assumptions are logistically impractical for most organisms, while for others, evidence that population cycles occur in nature is lacking. For insect baculoviruses in contrast, tests of model assumptions are straightforward, and there is strong evidence that baculoviruses help drive population cycles in many insects, including 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 that it is costly. Our experiments confirm both assumptions, and inserting parameters estimated from our data into eco-evolutionary insect-outbreak 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 on defoliators in nature and of heritable and costly resistance in defoliators in the lab together suggest that eco-evolutionary dynamics may play a general role in defoliator outbreaks.