The tumor immune microenvironment occupies an important position in gastric cancer. In this study, we investigated the relationship between indoleamine 2,3-dioxygenase 1 (IDO1), programmed cell death 1 ligand (PD-L1) expressioon, and CD8+ T-cell levels and their efficacy and prognostic value in preoperative gastric cancer specimens before neoadjuvant chemotherapy (NAC). A total of 162 patients with locally advanced gastric cancer were collected in this study. IDO1, PD-L1 expression, and CD8+ T-cell levels in the biopsy samples was detected by immunohistochemical staining, and the relationship between these indexes and the patients’ clinicopathological parameters, chemotherapeutic efficacy, and prognosis were investigated. The IDO1 positivity rate was 43.2%. High expression of IDO1 was significantly associated with poor chemotherapeutic efficacy, lymph node metastasis (P<0.05). The PD-L1 positivity rate (using the combined positive score) was 38.2%, and was not related to any clinicopathological variable. Higher CD8+ T-cell levels were associated with a lower rate of lymph node metastasis and lower ypTNM stage (P<0.05). Higher CD8+ T-cell levels were negatively correlated with IDO1 expression (r=−0.224, P<0.05) and positively correlated with PD-L1 expression (r=0.254, P<0.05). Cox regression analysis demonstrated that higher CD8+ T-cell levels was an independent risk factor for overall survival (OS) and the expression of IDO1 had a significantly poorer disease-free survival (DFS). Overexpression of IDO1 and lower CD8+ T-cell levels were associated with poor survival in patients with gastric cancer who received neoadjuvant chemotherapy, and overexpression of IDO1 were associated with the poor tumor response. Our data suggest that IDO1 and CD8 testing of biopsy specimens might be a simple and effective prognostic biomarker for gastric cancer, and IDO1 could predict efficacy of neoadjuvant chemotherapy in gastric cancer.