Despite the high prevalence of gastric cancer (GC), molecular biomarkers that can reliably detect GC are yet to be discovered. The present study aimed to establish a robust gene signature based on cancer driver genes (CDGs) that can predict GC prognosis. Transcriptional profiles and clinical data from GC patients were analyzed using univariate Cox regression analysis and the least absolute shrinkage and selection (LASSO)-penalized Cox regression analysis to select optimal prognosis-related genes for modeling. Time-dependent receiver operating characteristic (ROC) and Kaplan-Meier analyses were done to assess the predictive power of this gene signature. A nomogram model for prediction of survival of GC patients was established using the CDG signature and clinical information, and a seven-CDG signature was identified. Risk scores were calculated using this signature, and patients were subsequently divided into high- and low-risk groups; high-risk patients in the training and validation datasets had poorer prognoses than low-risk patients. Cox regression analysis revealed that the CDG signature is an independent prognostic factor for GC. The signature and other clinical features were used to construct a nomogram for predicting overall GC patient survival. Calibration and decision curve analysis showed that the nomogram accurately predicted survival, highlighting its clinical utility. Thus, we established a novel CDG signature and nomogram for predicting GC prognosis, which may facilitate personalized treatment of GC.