Sleeve gastrectomy is the most common bariatric (weight loss) surgery. In this surgery, most of the stomach is resected, forming a sleeve-shaped stomach connecting the esophagus and intestine. The surgery leads to weight loss, improvement in systemic metabolism, and profound changes in endocrine signaling. Here, we sought to study how the stomach itself responds to the surgery. Mathematical modeling showed that surgery would disturb pH homeostasis in the stomach, leading to a compensatory rise in gastrin, hyperproliferation, and an increase in the acid-secreting pathways of the stomach. Human data supports the model: we measured a sharp increase in gastrin days after surgery, hyperproliferation of stem cells, thickening of the mucosa, and an increase in the number of acid-secreting parietal cells and enterochromaffin-like cells that amplify the gastrin signal. Single-cell analysis of biopsies taken years after surgery show modulation in stem-cells and gastro-endocrine cells in the corpus and antrum of the stomach, with implications for gastric neuroendocrine tumors. Finally, while gastrin knockout mice displayed the characteristic weight loss and metabolic improvement following sleeve gastrectomy, their stomach did not adapt to the new anatomy. In conclusion, analyses of the gastric mucosa following sleeve gastrectomy demonstrate the gastrin-dependent plasticity of the human stomach and reveal the differentiation programs of the gastric mucosa.