In this study, the protective effects of two food hydrocolloids, Xanthan gum and Arabic gum, on dental erosion are investigated from the perspective of the nanomechanical properties and microtribological behavior of acid-eroded enamel. Enamel specimens prepared from extracted human teeth were immersed in citric acid solution (CAS), CAS with 0.03%w/vXanthan gum and CAS with 0.03%w/vArabic gum, respectively, for 10 min to obtain three groups of eroded specimens. The nanomechanical properties and microtribological behavior of enamel were examined using nano-indentation/scratch techniques. The results show that compared with Arabic gum, Xanthan gum inhibits enamel surface demineralization and acid permeation more effectively because of a more uniform and denser adsorption on the surface of the enamel. The impairment of the nanomechanical and microtribological properties of the enamel surface by acid erosion is mitigated more significantly by adding trace amounts of Xanthan gum than Arabic gum. In summary, adding trace food hydrocolloids reduces enamel surface demineralization and inhibits acid permeation to mitigate the influence of erosion on the mechanical and tribological properties of enamel. The adsorption state of food hydrocolloids is the determining factor in the permeability of acid agents into the enamel and plays a significant role in preventing dental erosion.