Background: The tumor microenvironment represents an abnormal niche containing numerous factors, such as T cells, dendritic cells (DCs), regulatory T cells (Tregs), and indoleamine 2,3‐dioxygenase (IDO), involved in maintaining immune homeostasis and tolerance. All these factors may influence the choice of therapy and the clinical outcomes.Methods: Flow cytometry was performed to identify CD4+/CD8 + T cells and DCs, and immunohistochemistry was used to evaluate IDO and Forkhead Box P3 (Foxp3) expression; these experiments were performed in order to explore the clinical and prognostic significance of CD4/CD8 + T cells, DCs, Tregs, and IDO expression in gastric carcinoma.Results: Smaller tumor size was correlated with higher expression levels of peripheral CD4 + T cells (P = .003) and CD8 + T cells (P = .002), and lower IDO expression (P = .044) in tumors. Well‐differentiated gastric carcinomas displayed higher peripheral (P = .029) and tumor‐infiltrating CD4 + T cell (P = .009) populations and a higher tumor‐infiltrating DC1/DC2 ratio (P = .048). Gastric cancer in the early T stages exhibited higher populations of peripheral DC2s (P = .044) and a higher tumor‐infiltrating DC1/DC2 ratio (P = .012). Gastric cancer at the N0 stage had lower tumor‐infiltrating DC2s (P = .032) and a higher DC1/DC2 ratio (P = .037). IDO expression was positively correlated with tumor‐infiltrating Foxp3 + Tregs (P < .001) as well as DC2s (P < .001), whereas it was negatively correlated with the tumor‐infiltrating CD4/CD8 + T cell ratio (P = .023). Tumor‐infiltrating Foxp3 + Treg was positively correlated with tumor‐infiltrating DC2s (r2 = 0.772; P < .001). At T, N, and TNM stages, the expression levels of peripheral DC2s, tumor‐infiltrating DC1/DC2 ratios, Foxp3 + Tregs, and IDO were significantly correlated with prognosis (P < .05). The T stage and peripheral DC2s were significant risk factors for overall survival.Conclusion: Immunocompetent cells and humoral immune factors, including DC2s, CD4+/CD8 + T cells, Foxp3 + Tregs, and IDO, interact with each other to compose a complex community of tumor immune microenvironment, ultimately affecting tumor progression and survival of gastric cancer.