In the univariate analysis of AGC patients, tumor PD-L1-positive status (HR = 0.668, 95% CI: 0.505–0.885, P = 0.005), high CD8+ T cell infiltration in tumor (HR = 0.691, 95% CI: 0.536–0.891, P = 0.004), and high FOXP3+ T cell infiltration in tumor (HR = 1.434, 95% CI: 1.061–1.938, P = 0.019) were revealed as protective or risk factors for OS in AGC patients. The gene discussed is FOXP3; the disease is neoplasm.