Gastric cancer (GC), of which cases with peritoneal metastasis are particularly challenging, retains its position of being highly complex and remarkably resistant to therapy. Understanding the spatial heterogeneity and leveraging recent technologies such as machine learning to uncover explanatory patterns remains critical to truly understanding this disease. Here, we conducted spatial transcriptomics analysis to identify distinct niches within GC tissues. Among these, a niche enriched with fibroblasts and macrophages exhibited a striking spatial co-infiltration pattern with tumor cells dominant niches. Further validation by multiplex immunofluorescence highlighted the coordinated cellular interactions that characterize the TME. Through integration of sc-RNA with bulk RNA sequencing, we identified DAB2⁺ TAMs and ACTA2⁺ myCAFs as the main contributors to this co-infiltration pattern. NicheNet analysis further revealed that the PLAU-PLAUR signaling axis holds a central regulatory role in the communication between macrophages, fibroblasts and tumor cells. Given the prognostic value of this spatial pattern, we additionally applied transfer learning based on an ImageNet pre-trained ResNet-50 model to develop a machine learning framework that can accurately recognize the macrophage-fibroblast-malignant cell co-infiltration pattern, called Gastric-Discovery. Potentially, Gastric-Discovery could be a tool for precise patient stratification and provides novel insights into the dynamic architecture of the TME.