Globally, corals face an increased frequency of mass mortality events (MMEs) as populations experience repeated marine heatwaves which disrupt their obligate algal symbiosis. Despite greater occurrences of MMEs, the relative roles of the environment, host, and symbiont genetic variation in survival and recovery remain unresolved. We explore these roles using high-resolution temporal and spatial whole genome sequencing of corals before, after, and several years following a MME. We show that host genetics has an impact on bleaching and mortality and that selected alleles important for adaptation persist through the next generation. We also demonstrate that survival for the bleaching event was highly polygenic and that allele frequency shifts have reef habitat specificity. This study reveals how MMEs reshape the genomic landscape and the spatial and temporal distribution of genomic diversity within coral populations facing severe threats from global change.