Population genetic theory predicts that adaptation in novel environments is enhanced by genetic variation for fitness. However, theory also predicts that under strong selection, demographic stochasticity can drive populations to extinction before they can adapt. We exposed wheat-adapted populations of the flour beetle (Tribolium castaneum) to a novel suboptimal corn resource, to test the effects of founding genetic variation on population decline and subsequent extinction or adaptation. As previously reported, genetically diverse populations were less likely to go extinct. Here, we show that among surviving populations, genetically diverse groups recovered faster after the initial population decline. Within two years, surviving populations significantly increased their fitness on corn via increased fecundity, increased egg survival, faster larval development, and higher rate of egg cannibalism. However, founding genetic variation only enhanced the increase in fecundity, despite existing genetic variation—and apparent lack of trade-offs—for egg survival and larval development time. Thus, during adaptation to novel habitats the positive impact of genetic variation may be restricted to only a few traits, although change in many life-history traits may be necessary to avoid extinction. Despite severe initial maladaptation and low population size, genetic diversity can thus overcome the predicted high extinction risk in new habitats.