Gastric mucin, a high molecular weight glycoprotein, is responsible for providing the gel-forming properties and protective function of the gastric mucus layer. Bulk rheology measurements in the linear viscoelastic regime show that gastric mucin undergoes a pH-dependent sol-gel transition from a viscoelastic solution at neutral pH to a soft viscoelastic gel in acidic conditions, with the transition occurring near pH 4. In addition to pH-dependent gelation behavior in this system, further rheological studies under nonlinear deformations reveal shear thinning and an apparent yield stress in this material which are also highly influenced by pH.