Long noncoding RNA (lncRNA) may act as a biomarker to predict the overall survival (OS) of cancer patients. This study is to explore the prognostic signature of gastric cancer based on N7-methylguanosine-related lncRNAs to evaluate the prognosis and immune status of patients. The lncRNAs were identified by co-expression analysis, univariate and, stepwise multivariate Cox regression. Then, patients were divided into the high-and low-risk groups. Time-dependent receiver operating characteristics, log-rank test, principal component analysis, and nomogram were used to analyze the risk model.Finally, different immune status between the two groups was revealed by gene set enrichment/variation analysis (GSEA/GSVA), CIBERSORTx, and ESTIMATE algorithm.The difference in tumor mutation burden and drug sensitivity between the two groups was also explored. Three lncRNAs (LINC00412, REPIN1-AS1, and RPH3AL-AS1) were employed to construct the prognostic model. The OS rate of the high-risk group was lower than the low-risk group. GSEA and GSVA indicated this model was associated with immune-related function, such as negative regulation of humoral immune response. Furthermore, the relative fractions of regulatory T cells, activated NK cells, and so forth, were significantly higher in the high-risk group. And ESTIMATE revealed the different immune scores between the two groups. Finally, six compounds were screened out as candidate therapy drugs, and the prognostic model revealed higher performance than TP53 mutation status. The prognostic signature was competent in predicting the prognosis of gastric cancer and the immune microenvironment, which could guide individualized treatment for gastric cancer in the clinic.