Stomach pain accompanied by headache may be caused by acute gastritis due to infection, mental trauma, etc. It may also be caused by chronic gastritis due to long-term mental factors. 1. Acute gastritis caused by infection: patients who ingest food contaminated by bacteria and their toxins may lead to acute gastritis, which may be accompanied by headache, fever and other systemic symptoms in addition to the symptoms of stomach pain. 2. Acute gastritis caused by mental trauma: Sudden mental trauma will not only lead to the symptoms of headache, but also may lead to acute stress gastric mucosal lesions, and the patient will have stomach pain and headache at the same time. 3. Chronic gastritis caused by mental factors: long-term mental stress, depression, anxiety and other mental causes can lead to headache symptoms, but also make the digestive tract hormone secretion abnormality, leading to chronic gastritis at the same time, so that the symptoms of stomach pain. It is recommended that patients with stomach pain and headache go to the hospital for further examination and treatment in a timely manner to avoid blind medication.