Introduction: Anti-programmed cell death 1 (PD-1) therapies have shown promising clinical activity against gastric cancer (GC). We evaluated the clinical significance of immune-related gene expression in GC tissues to better understand the tumor immune microenvironment. Methods: PD-1, PD-1 ligand 1 (PD-L1) and CD8 mRNA levels and clinicopathological factors, including survival, were examined by quantitative RT-PCR in 155 GC patients who underwent surgery. PD-1 and PD-L1 expression in tumor tissue from 24 GC patients was investigated by immunohistochemical analysis. Results: PD-1, PD-L1 and CD8 mRNA levels were significantly lower in tumor tissue than in normal tissue (p < 0.0001, p < 0.05, and p < 0.0001). GC patients with low PD-1, PD-L1 and CD8 mRNA levels had significantly poorer overall survival (OS) than those with high PD-1, PD-L1 and CD8 mRNA levels, respectively (p < 0.001, p < 0.01 and p < 0.05). Low PD-1, PD-L1 and CD8 mRNA levels were more significantly associated with poor prognosis in undifferentiated-type GC pa-tients than in differentiated-type GC patients (PD-1: differentiated p = 0.0071 vs. undifferentiated p = 0.0024; PD-L1: p = 0.6527 vs. p < 0.0001; CD8: p = 0.4465 vs. p < 0.05). Multivariate analysis showed that lymph node metastasis, peritoneal dissemination, distant metastasis, low PD-1 mRNA levels and low CD8 mRNA levels were independent prognostic factors for worse OS (low PD-1 mRNA level: OR 2.16, 95% CI 1.10-4.58, p < 0.05; low CD8 mRNA level: OR 2.55, 95% CI 1.12-6.90, p < 0.05). PD-1 and PD-L1 mRNA levels in immune cells were significantly associated with PD-1 and PD-L1 protein levels (both p < 0.05), respectively. Conclusions: PD-1, PD-L1 and CD8 mRNA levels may reflect antitumor immunity in GC, and low PD-1 and CD8 mRNA levels are potential predictive biomarkers for poor prognosis in GC patients who underwent surgery.