Egletes viscosa (L.) (macela) is a native wild herb that can be found in different states of northeastern Brazil. The infusions of its flower buds are traditionally used for the treatment of gastrointestinal disorders. E. viscosa possesses two chemotypes (named A and B), distinguishable by the composition of the essential oil from the flower buds. Although there are previous studies of the gastroprotective effect of the isolated constituents of E. viscosa, its infusions have not been investigated yet. The present study aimed to evaluate and compare the chemical composition and the gastroprotective effect of flower bud infusions of E. viscosa from chemotype A (EVCA) and chemotype B (EVCB). Sixteen infusions were brewed with flower buds according to the traditional preparation mode and were analyzed through a UPLC-QTOF-MS/MS based metabolomic approach for determination of their metabolic fingerprints and quantification of bioactive compounds. Afterward, these data were analyzed by chemometric methods (OPLS-DA) for discrimination of the two chemotypes. Additionally, infusions of EVCA and EVCB (50, 100 and 200mg/kg, p.o.) were evaluated on gastric ulcers induced by absolute ethanol (96%, 0.2mL, p.o.) in mice. To elucidate the gastroprotective mechanisms, the effect of EVCA and EVCB on gastric acid secretion and gastric wall mucus was determined and the role of TRPV1 channels, prostaglandins, nitric oxide and KATP channels were assessed. Moreover, the oxidative stress-related parameters and the histological aspects of the stomach tissue were analyzed. The chemotypes can be discriminated from each other using UPLC-QTOF-MS/MS chemical fingerprints. Both chemotypes presented similar chemical compositions, consisting basically of caffeic acid derivatives, flavonoids and diterpenes. The quantification of bioactive compounds demonstrated that chemotype A possesses more ternatin, tanabalin and centipedic than chemotype B. EVCA and EVCB (50, 100 and 200mg/kg, p.o.) significantly decreased the severity of ethanol-induced gastric lesions, as shown by a reduction in histological alterations and leucocyte infiltration in gastric tissue. The gastroprotective mechanism of both infusions involves an antioxidant effect, maintenance of gastric mucus and reduction gastric secretion. Stimulation of endogenous prostaglandins and nitric oxide release, activation of TRPV1 channels, and KATP channels are also involved in the gastroprotection of the infusions. The gastroprotective effect of EVCA and EVCB was equivalent and mediated through antioxidant and antisecretory actions, including the activation of TRPV1 receptors, stimulation of endogenous prostaglandins and nitric oxide, and opening of KATP channels. The presence of caffeic acid derivatives, flavonoids and diterpenes in both infusions is involved in mediating this protective effect. Our findings support the traditional use of infusions of E. viscosa for gastric disorders regardless of the chemotype.