It's been a personal experience. I am at home now and take tea twice a day. For 2 months now I have been having acidity problems, which, my doctor told me, were the main reason I have been getting gags the whole day. I had quit taking tea ceterus paribus and have noticed that frequency of getting gags has drastically reduced. I am curious: can tea or any particular component of it cause acidity which eventually causes people to feel like retching?
I haven't found any studies that would directly link retching and the consumption of tea. However, this would be a rather narrow research, so the lack of it is no surprise. Your doctor told you that your acidity problems may be caused by tea and that this might be causing your gags, and they are correct.
It has been proven that consumption of tea is directly related to increased secretion of gastric acid (1):
The gastric acid response to a 200-ml cup of tea was measured [...] Tea resulted in an acid secretory response which was almost equal to that after a maximal dose (0.04 mg/kg) of histamine. The effect of tea was mainly due to its local chemical action on gastric mucosa. Tea without milk and sugar resulted in an acid response higher than that evoked by a maximal dose of histamine. The concentration of tea brew that had the greatest effect on gastric acid secretion was 15 g/200 ml, which was three times as much as that in a palatable cup of tea. Tea is a potent stimulant of gastric acid, and this can be reduced by adding milk and sugar.
This effect of tea is most likely caused by caffeine, which was proven to increase gastric secretion in animals and humans. (2, 3)
Therefore tea can have some adverse effects (4):
Green tea and green tea extracts contain caffeine. Caffeine can cause insomnia, anxiety, irritability, upset stomach, nausea, diarrhea, or frequent urination in some people.
*Some sources state that increased gastric secretion and possible irritation of gastric mucosa are caused by chlorogenic acid and tannins, which is why these effects are reduced by addition of milk. Other sources, however, state that both chlorogenic acid and tannins reduce gastric secretion.