Univariate analysis revealed that tumor location (OR = 2.92, 95%CI 0.91–9.44, P = 0.0426), Lauren subtype (OR = 0.21, 95%CI 0.06–0.75, P = 0.0163), tumor differentiation (OR = 0.12, 95%CI 0.01–1.11, P = 0.0416), CA125 (OR = 1.08, 95%CI 1.01–1.16, P = 0.0098), and gastric endoscopic biopsy Claudin 18.2 immunohistochemical score (CLDN18.2 score) (OR = 0.86, 95%CI 0.76–0.97, P = 0.0169) were significantly associated with the occurrence of occult peritoneal metastasis in gastric cancer. The gene discussed is CLDN18; the disease is gastric cancer.