We present a comprehensive mathematical model describing Helicobacter pylori interaction with the human gastric acid secretion system. We use the model to explore host and bacterial conditions that allow persistent infection to develop and be maintained. Our results show that upon colonization, there is a transient period (day 1-20 post-infection) prior to the establishment of persistence. During this period, changes to host gastric physiology occur including elevations in positive effectors of acid secretion (such as gastrin and histamine). This is promoted by reduced somatostatin levels, an inhibitor of acid release. We suggest that these changes comprise compensatory mechanisms aimed at restoring acid to pre-infection levels. We also show that ammonia produced by bacteria sufficiently buffers acid promoting bacteria survival and growth.