Gastritis is an inflammation of the stomach lining. It occurs gradually and persists for a prolonged time. Although it doesn't cause heartburn, some of the symptoms are similar to those produced by heartburn, and it's treated in a similar way to GERD, by taking medication to reduce stomach acid.