At present, immunotherapy has become a powerful treatment for advanced gastric cancer (AGC), but not all patients can benefit from it. According to the latest research, the impact of B cell subpopulations on the immune microenvironment of gastric cancer (GC) is unknown. Exploring whether the interaction between B cells and tumor cells in GC affects the effectiveness of immunotherapy has attracted our interest. This study involved the re-analysis of single-cell RNA (scRNA) and spatial transcriptomics (ST) data from publicly available datasets. The focus was on investigating the subpopulations and differentiation trajectories of B cells in the gastric cancer (GC) tumor immune microenvironment (TIME). Spatial transcriptomics (ST) and multiple immunofluorescence (mIF) revealed a clear co-localization pattern between B cells and tumor cells. Multiple immunotherapy datasets were collected to identify unique immunotherapy biomarkers. The unique immunotherapeutic potential of targeting CCL28 was validated through a mouse gastric cancer model. In addition, flow cytometry revealed changes in the tumor immune microenvironment targeting CCL28. The re-analysis of ST data from multiple cancer types revealed a co-localization pattern between B cells and tumor cells. A significant number of IgA plasma cells were identified in the GC TIME. Five different tumor-infiltrating B cell subpopulations and two unique B cell differentiation trajectories were characterized, along with seven GC-related states. By analyzing the communication between GC cells and B cells, it was further discovered that tumor cells can influence and recruit plasma cells through CCL28-CCR10 signaling. Additionally, there was a crosstalk between GC cells and B cells. Finally, we identified the LAMA/CD44 signaling axis as a potential prognostic marker for immunotherapy through a large amount of immunotherapy data. We also validated through various animal tumor models that targeting CCL28 can significantly promote CD8+T cell infiltration and function in the TME by regulating B cell and plasma cell functions, and has the ability to synergize immunotherapy. The co-localization and crosstalk between GC cells and B cells significantly affect the efficacy of immunotherapy, and inhibiting the CCL28-CCR10 signal axis is a potential immunotherapy target for GC. Meanwhile, LAMA/CD44 pair may be a potential adverse indicator for immunotherapy and tumor prognosis.