5-Fluorouracil (5-FU)-based chemotherapy is currently the first-line treatment for gastric cancer. In this study, using gene expression profiles for a panel of cell lines with drug sensitivity data and two cohorts of patients, we extracted a signature consisting of two gene pairs (KCNE2 and API5, KCNE2 and PRPF3) whose within-sample relative expression orderings (REOs) could robustly predict prognoses of gastric cancer patients treated with 5-FU-based chemotherapy. This REOs-based signature was insensitive to experimental batch effects and could be directly applied to samples measured by different laboratories. Taking this unique advantage of the REOs-based signature, we classified gastric cancer samples of The Cancer Genome Atlas (TCGA) into two prognostic groups with distinct transcriptional characteristics, circumventing the usage of confounded TCGA survival data. We further showed that the two prognostic groups displayed distinct copy number, gene mutation and DNA methylation landscapes using the TCGA multi-omics data. The results provided hints for understanding molecular mechanisms determining prognoses of gastric cancer patients treated with 5-FU-based chemotherapy.