| Gastric cancer is a deadly malignancy afflicting close to a million people worldwide. Patient survival is poor and largely due to late diagnosis and suboptimal therapies. Disease heterogeneity is a substantial obstacle, underscoring the need for precision treatment strategies. Studies have identified different subgroups of gastric cancer displaying not just genetic, but also distinct epigenetic hallmarks. Accumulating evidence suggests that epigenetic abnormalities in gastric cancer are not mere bystander events, but rather promote carcinogenesis through active mechanisms. Epigenetic aberrations, induced by pathogens such as Helicobacter pylori, are an early component of gastric carcinogenesis, probably preceding genetic abnormalities. This Review summarizes our current understanding of the gastric cancer epigenome, highlighting key advances in recent years in both tumours and pre-malignant lesions, made possible through targeted and genome-wide technologies. We focus on studies related to DNA methylation and histone modifications, linking these findings to potential therapeutic opportunities. Lessons learned from the gastric cancer epigenome might also prove relevant for other gastrointestinal cancers.