Gastric cancer is a leading cause of cancer-related mortality worldwide, and options to treat gastric cancer are limited. Fluorouracil (5Fu)-based chemotherapy is frequently used as a neoadjuvant or an adjuvant agent for gastric cancer therapy. Most patients with advanced gastric cancer eventually succumb to the disease despite the fact that some patients respond initially to chemotherapy. Thus, identifying molecular mechanisms responsible for chemotherapy resistance will help design novel strategies to treat gastric cancer. In this study, we discovered that residual cancer cells following 5Fu treatment have elevated expression of hedgehog target genes GLI1 and GLI2, suggestive of hedgehog (Hh) signaling activation. Hh signaling, a pathway essential for embryonic development, is an important regulator for putative cancer stem cells/ residual cancer cells. We found that high GLI1/GLI2 expression is associated with some features of putative cancer stem cells, such as increased side population. We demonstrated that GLI2 knockdown sensitized gastric cancer cells to 5Fu treatment, decreased ABCG2 expression, and reduced side population. Elevated GLI2 expression is also associated with an increase in tumor sphere size, another marker for putative cancer stem cells. We believe that GLI2 regulates putative cancer stem cells through direct regulation of ABCG2. ABCG2 can rescue the Gli2 shRNA effects in 5Fu response, tumor sphere formation and side population changes, suggesting that ABCG2 is an important mediator for GLI2-associated 5Fu resistance. The relevance of our studies to gastric cancer patient care is reflected by our discovery that high GLI1/GLI2/ABCG2 expression is associated with a high incidence of cancer relapse in two cohorts of gastric cancer patients who underwent chemotherapy (containing 5Fu). Taken together, we have identified a molecular mechanism by which gastric cancer cells gain 5Fu resistance.