Helicobacter pylori causes gastric inflammation, gland hyperplasia and is linked to gastric cancer. Here, we studied the interplay between gastric epithelial stem cells and their stromal niche under homeostasis and upon H. pylori infection. We find that gastric epithelial stem cell differentiation is orchestrated by subsets of stromal cells that either produce BMP inhibitors in the gland base, or BMP ligands at the surface. Exposure to BMP ligands promotes a feed-forward loop by inducing Bmp2 expression in the epithelial cells themselves, enforcing rapid lineage commitment to terminally differentiated mucous pit cells. H. pylori leads to a loss of stromal and epithelial Bmp2 expression and increases expression of BMP inhibitors, promoting self-renewal of stem cells and accumulation of gland base cells, which we mechanistically link to IFN-gamma signaling. Mice that lack IFN-gamma signaling show no alterations of BMP gradient upon infection, while exposure to IFN-gamma resembles H. pylori-driven mucosal responses.