Global climate change poses a serious threat to the future health of coral reef ecosystems. This calls for management strategies that are focused on maximizing the evolutionary potential of coral reefs. Fundamental to this is an accurate understanding of the spatial genetic structure in dominant reef-building coral species. In this study, we apply a genotyping-by-sequencing approach to investigate genome-wide patterns of genetic diversity, gene flow, and local adaptation in a reef-building coral, Pocillopora damicornis, across 10 degrees of latitude and a transition from temperate to tropical waters. We identified strong patterns of differentiation and reduced genetic diversity in high-latitude populations. In addition, genome-wide scans for selection identified a number of outlier loci putatively under directional selection with homology to proteins previously known to be involved in heat tolerance in corals and associated with processes such as photoprotection, protein degradation, and immunity. This study provides genomic evidence for both restricted gene flow and local adaptation in a widely distributed coral species, and highlights the potential vulnerability of leading-edge populations to rapid environmental change as they are locally adapted, reproductively isolated, and have reduced levels of genetic diversity.