This study attempted to investigate the potential of a risk model constructed for regulatory T cells (Tregs) and their related genes in predicting gastric cancer (GC) prognosis. We used flow cytometry to detect the content of CD4+CD25+ Tregs. After detecting expression of five Treg-related genes by quantitative real-time polymerase chain reaction (qRT-PCR), Pearson analysis was employed to analyze the correlation between Tregs and related gene expression. 3-(4,5-dimethylthiazol-2-yl)-2,5-diphenyltetrazolium bromide (MTT), colony formation and transwell assays were used to detect the effects of a disintegrin and metalloproteinase with thrombospondin motifs 12 (ADAMTS12) on cell functions. A prognostic risk model was built after Cox regression analysis. The Kaplan-Meier method was employed to assess how Tregs, 5-gene risk scores and expression of 5 genes were correlated with the survival time. A significantly increased content of Tregs was found in GC tissues (p < 0.05). 5 Treg- related genes were significantly up-regulated in GC with a positive correlation with the content of Tregs (p < 0.05). Overexpression of ADAMTS12 significantly enhanced the viability, proliferation, migration and invasion of tumor cells. Kaplan-Meier analysis demonstrated poor overall survival and disease-free survival in the high-risk group. The results of survival analysis of Treg content and related gene expression were consistent with those of Cox analysis. The risk model constructed based on five Treg-related genes can enable effective prediction in the prognosis of GC patients.