The goal of the study was to investigate the changes in the gut microbiota during the advancement of gastric cancer (GC) and identify pertinent taxa associated with the disease. We used a public fecal amplicon gastric cancer dataset from the Sequence Retrieval Archive (SRA), of patients with GC, gastritis, and healthy individuals. We did sequence pre-processing, including quality filtering of the sequences. Then, we performed a diversity analysis, evaluating α- and β-diversity. Next, taxonomic composition analysis was performed and the relative abundances of different taxa at the phylum and genus levels were compared between GC, gastritis, and healthy controls. The obtained results were subsequently subjected to statistical validation. To conclude, metagenomic function prediction was carried out, followed by correlation analysis between the microbiota and KEGG pathways. α analysis revealed a significant difference between male and female categories, while β analysis demonstrated significant distinctions between GC, gastritis, and healthy controls, as well as between sexes within the GC and gastritis groups. The statistically confirmed taxonomic composition analysis highlighted the presence of the microbes Bacteroides and Veillonella. Furthermore, through metagenomic prediction analysis and correlation analysis with pathways, three taxa, namely Akkermansia, Gammaproteobacteria, and Veillonella, were identified as potential biomarkers for GC. Additionally, this study reports, for the first time, the presence of two bacteria, Desulfobacteriota and Synergistota, in GC, necessitating further investigation. Overall, this research sheds light on the potential involvement of gut microbiota in GC pathophysiology; however, additional studies are warranted to explore its functional significance.