High CD8+ T cell infiltration in tumor (HR = 0.707, 95% CI: 0.546–0.914, P = 0.008), TNM stage (HR = 0.350, 95% CI: 0.257–0.476, P ≤ 0.001), and length-diameter (HR = 1.495, 95% CI: 1.123–1.991, P = 0.006) could act independent predictors of OS for AGC patients. This evidence concerns the gene CD8A and neoplasm.