Gorillas are humans’ closest living relatives after chimpanzees, and are of comparable importance for the study of human origins and evolution. Here we present the assembly and analysis of a genome sequence for the western lowland gorilla, and compare the whole genomes of all extant great ape genera. We propose a synthesis of genetic and fossil evidence consistent with placing the human–chimpanzee and human–chimpanzee–gorilla speciation events at approximately 6 and 10 million years ago. In 30% of the genome, gorilla is closer to human or chimpanzee than the latter are to each other; this is rarer around coding genes, indicating pervasive selection throughout great ape evolution, and has functional consequences in gene expression. A comparison of protein coding genes reveals approximately 500 genes showing accelerated evolution on each of the gorilla, human and chimpanzee lineages, and evidence for parallel acceleration, particularly of genes involved in hearing. We also compare the western and eastern gorilla species, estimating an average sequence divergence time 1.75 million years ago, but with evidence for more recent genetic exchange and a population bottleneck in the eastern species. The use of the genome sequence in these and future analyses will promote a deeper understanding of great ape biology and evolution. The genome of a western lowland gorilla has been sequenced and analysed, completing the genome sequences of all great ape genera, and providing evidence for parallel accelerated evolution in chimpanzee, gorilla and human lineages at a number of loci. The genome of the gorilla has been sequenced, making it possible to compare the DNA of the four surviving hominid genera: human, chimpanzee, gorilla and orang-utan. The data — mainly from a female western lowland gorilla named Kamilah, but also from other gorillas representing both the western lowland and eastern lowland sub-species — imply that in almost one-third of its genome, the gorilla is closer to the human or chimpanzee than the human and chimp are to each other. Around 500 genes show accelerated evolution in gorilla, human and chimpanzee lineages, and there is evidence for parallel acceleration, particularly in genes associated with hearing. On the basis of genetic and fossil evidence, the authors suggest that the human–chimpanzee and human–chimpanzee–gorilla speciation events occurred at around 6 million and 10 million years ago respectively, whereas the two gorilla species diverged around 1.75 million years ago.