The survival rate of stomach adenocarcinoma patients with immune and stromal scores and different clinicopathological features obtained from the TCGA datasets was systematically compared. A list of genes that are correlated with stomach adenocarcinoma microenvironment were extracted using the TCGA database to predict the prognosis and survival. In addition, the differentially expressed genes were extracted by comparing the immune and stromal scores of the groups. The protein-protein interaction network, and functional and pathway enrichment analyses of differentially expressed genes were performed. A total of 8 hub genes were selected from the differentially expressed genes to predict the overall survival and disease-free survival rates. GPNMB was selected from the hub genes based on the survival and prognosis analyses. A nomogram was built by including the potential risk factors based on multivariate Cox analysis. Cell function experiments and xenograft tumors were conducted in vivo to further verify the role of GPNMB in tumor progression. The predicted microRNA, miR-30b-3p, might act as upstream negative regulator and binding to 3’ UTR of GPNMB, confirming by fluorescent enzyme reporter gene experiment. In summary, immune-related scores are crucial factors in the malignant progression of stomach adenocarcinoma and GPNMB acts as a potentially useful prognostic factor for stratification and in developing the treatment strategy