Autoimmune gastritis and Helicobacter pylori-associated gastric atrophy develop through similar mechanisms involving the proton pump H+,K+-adenosine triphosphatase as autoantigen. Here, we report that H. pylori-infected patients with gastric autoimmunity harbor in vivo-activated gastric CD4+ T cells that recognize both H+, K+-adenosine triphosphatase and H. pylori antigens. We characterized the submolecular specificity of such gastric T cells and identified cross-reactive epitopes from nine H. pylori proteins. Cross-reactive H. pylori peptides induced T cell proliferation and expression of T helper type 1 functions. We suggest that in genetically susceptible individuals, H. pylori infection can activate cross-reactive gastric T cells leading to gastric autoimmunity via molecular mimicry.