Microbial and viral pathogens have emerged as pivotal agents in oncogenesis. Research conducted in the last twenty years has significantly enhanced our comprehension of the cancer-causing capabilities of infectious agents. An illustrative instance is gastric cancer (GC), which is closely associated with Helicobacter pylori (H. pylori) and Epstein-Barr virus (EBV) infections. Despite concerted endeavors, GC remains a serious clinical challenge ranking as the fifth most commonly diagnosed cancer worldwide. In 2020, an estimated 768,793 people died from GC in the world. The pathogenicity island (PAI), cagA protein, VacA and other virulence factors in H. pylori and several latency factors such as EBNA-1, LMP-1 and LMP2A in Epstein-Barr virus as well as pattern of gene methylation and EBV and H. pylori co-infection are shown as the main causes of pathogen-related GC. The unique molecular and clinical characteristics associated with EBV and H. pylori in GC, highlight the importance of further understanding their respective roles in GC development and progression. This knowledge may inform future preventive and therapeutic strategies targeting these infectious agents in the context of GC. This review aims to elucidate the mechanisms underpinning EBV and H. pylori-induced carcinogenesis in GC.