Typically, chest pain from a heart attack is triggered by exertion or emotions although it can occur without any warning. The hall mark features of angina is chest tightness or pain, especially on the left side, together with breathlessness, dizziness or sweating. If there is no improvement over the following few minutes, a full blown heart attack or myocardial infarction may occur.
In gastritis, the pain or discomfort is usually located at the upper abdomen and this pain mostly progresses over sometime and takes a while to subside with or without medication. In some cases, gastric acid may enter the oesophagus causing what commonly known as heartburn which simulates a "heart attack". However, such chest burning pain does not result in actual heart muscle injury or heart attack.
In addition to the above, most chest pain due to acid reflux responds well to acid suppressants or liquid antacid. If in doubt, the best bet for you is to consult your family doctor assuming the pain you are experiencing is not an emergency.
-Dr Quan