To sum up, GBP2 expression is a promising pan-cancer biomarker for estimating the immunological characteristics of tumors and may be utilized to detect immuno-hot tumors in gastric cancer. This evidence concerns the gene GBP2 and gastric cancer.