Angiotensinogen (AGT), as a component of the renin-angiotensin system (RAS), is associated with multiple risk factors for gastric cancer (GC). However, the relationship between AGT and tumor-infiltrating lymphocytes in GC remains elusive. Methods: AGT expression was analyzed based on the Cancer Genome Atlas (TCGA) dataset. Kaplan-Meier curve was employed to assess the role of AGT expression in gastric patients' prognosis. The association between AGT expression and tumor immune infiltration was further evaluated via exploring Tumour Immune Estimation Resource (TIMER) and The Gene Expression Profiling Interactive Analysis (GEPIA). We also used multiple public databases to analyse the aberrant methylation of AGT, construct proteinprotein interaction (PPI) and gene ontology (GO) analyses. Results: AGT was overexpressed in GC tissues compared with normal gastric tissues (P<0.05). High AGT expression related with poorer overall survival of patients with GC, especially in advanced GC patients. Immune infiltration analysis revealed that AGT was associated with several immune cells (including B cells, CD4+ T cells, macrophages), and AGT expression was also associated with the markers of NK cells, TAMs, Tregs, and so on (all P<0.05). Methylation analysis indicated that hypomethylation may lead to abnormal upregulation of the AGT. GO analysis showed that AGT and its related genes were enriched in systemic arterial blood pressure by hormone, regulation of blood volume by renin-angiotensin, NIK/NF-kappaB signaling, ficolin-1-rich granule and so on. Conclusion: AGT could act as a promising biomarker for prognosis and immune infiltration in GC.