Gastric cancer is a common malignant tumor of the digestive tract, and its treatment remains a significant challenge. In recent years, the role of various immune cells in the tumor microenvironment in cancer progression and treatment has gained increasing attention. Immunotherapy, primarily based on immune checkpoint inhibitors, has notably improved the prognosis of patients with gastric cancer; however, challenges regarding therapeutic efficacy persist. Histological features within the tumor microenvironment, such as tertiary lymphoid structures (TLSs), tumor-infiltrating lymphocytes, and the proportion of intratumoral stroma, are emerging as potentially effective prognostic factors. In gastric cancer, TLSs may serve as local immune hubs, enhancing the ability of immune cells to interact with and recognize tumor antigens, which is closely linked to the effectiveness of immunotherapy and improved survival rates in patients. However, the specific cell type driving TLS formation in tumors has not yet been elucidated. Mature TLSs are B-cell regions containing germinal centers. During germinal center formation, B cells undergo transformations to become mature cells with immune function, exerting anti-tumor effects. Therefore, targeting B cells within TLSs could provide new avenues for gastric cancer immunotherapy. This review, combined with current research on TLSs and B cells in gastric cancer, elaborates on the relationship between TLSs and B cells in the prognosis and immunotherapy of patients with gastric cancer, aiming to provide effective guidance for precise immunotherapy.