BackgroundGastric cancer (GC) is one of the most prevalent cancers, and it has unsatisfactory overall treatment outcomes. DNA damage repair (DDR) is a complicated process for signal transduction that causes cancer. lncRNAs can influence the formation and incidence of cancers by influencing DDR-related mRNAs/miRNAs. A DDR-related lncRNA prognostic model is urgently needed to improve treatment strategies.MethodsThe data of GC samples were obtained from The Cancer Genome Atlas (TCGA) and Gene Expression Omnibus (GEO) datasets. A total of 588 mRNAs involved in DDR were selected from MSigDB, 62 differentially expressed mRNAs from TCGA-STAD were obtained, and 137 lncRNAs were correlated with these mRNAs. Univariate Cox regression and least absolute shrinkage and selection operator (LASSO) regression analyses were used to develop a DDR-related lncRNA prognostic model. Based on the risk model, the differentially expressed gene signature A/B in the low-risk and high-risk groups of TCGA-STAD was identified for further validation.ResultsThe prognosis model of 5 genes (AC145285.6, MAGI2-AS3, AL590705.3, AC007405.3, and LINC00106) was constructed and classified into two risk groups. We found that GC patients with a low-risk score had a better OS than those with a high-risk score. We found that the high-risk group tended to have higher TME scores. We also found that patients in the high-risk group had a higher proportion of resting CD4 T cells, monocytes, M2 macrophages, resting dendritic cells, and resting mast cells, whereas the low-risk subgroup had a greater abundance of activated CD4 T cells, follicular helper T cells, M0 macrophages, and M1 macrophages. We observed significant differences in the T-cell exclusion score, T-cell dysfunction, MSI, and TMB between the two risk groups. In addition, we found that patients treated with immunotherapy in the low-RS score group had a longer survival and a better prognosis than those in the high-RS score group.ConclusionThe prognostic model has a significant role in the TME, clinicopathological characteristics, prognosis, MSI, and drug sensitivity. We also discovered that patients treated with immunotherapy in the low-RS score group had a better prognosis. This work provides a foundation for improving the prognosis and response to immunotherapy among patients with GC.