High-throughput sequencing has ushered in a paradigm shift in gastric microbiota, breaking the stereotype that the stomach is hostile to microorganisms beyond H. pylori. Recent attention directed toward the composition and functionality of this 'community' has shed light on its potential relevance in cancer. The microbial composition in the stomach of health displays host specificity which changes throughout a person's lifespan and is subject to both external and internal factors. Distinctive alterations in gastric microbiome signature are discernible at different stages of gastric precancerous lesions and malignancy. The robust microbes that dominate in gastric malignant tissue are intricately implicated in gastric cancer susceptibility, carcinogenesis, and the modulation of immunosurveillance and immune escape. These revelations offer fresh avenues for utilizing gastric microbiota as predictive biomarkers in clinical settings. Furthermore, inter-individual microbiota variations partially account for differential responses to cancer immunotherapy. In this review, we summarize current literature on the influence of the gastric microbiota on gastric carcinogenesis, anti-tumor immunity and immunotherapy, providing insights into potential clinical applications.