Treatment for gastritis usually involves taking drugs to reduce stomach acid, which relieves the symptoms, and promotes healing. Avoidance of certain foods, beverages, or medicines may also be recommended.
If your gastritis is caused by an infection, that problem may be treated as well. For example, the doctor might prescribe antibiotics to clear up H. Pylori infection. Once the underlying problem disappears, the gastritis usually does too. Talk to your doctor before stopping any medicine or starting any gastritis treatment on your own.
This answer is based on source information from the National Institute of Diabetes and Digestive and Kidney Diseases.