In most cases of gastritis, OTC antacids can help treat the condition. However, gastritis can be caused due to several reasons, including but not limited to bacterial infections, ulcers, fungal infections, bile reflux, overconsumption of steroids and alcohol, and food poisoning. If any one of these conditions is responsible for gastritis, then it has to be treated for you to feel any relief. The use of antacids in such a situation will not help treat gastritis.