(1) Background: Gastric cancer (GC) is the most common high death-rate cancer type worldwide, with an enhanced prevalence and increased rate of mortality. Although significant evidence on surgery strategy has been generated for the treatment of GC, conclusions are still uncertain regarding profound metastatic or persevering gastric cancer. Therefore, it is essential to develop novel and effective biomarkers or therapeutic targets for the diagnosis of GC. Histone deacetylations (HDACs) are important epigenetic regulators that control the aberrant transcription of critical genes that are mainly involved in cell proliferation, cell migration, regulation of the cell cycle, and different signal pathways. (2) Methods: Expression analysis of HDACs family members and E2F5 in gastric cancer cell lines was determined by RT-PCR and Western blotting. The cell proliferation was determined through an MTT assay. Cell migration was determined using a wound-healing assay. Flow cytometry experiments were used to determine cell-cycle analysis. The statistical software OriginPro 2015 (OriginLab, Northampton, MA, USA) was used to analyze data. A p value of < 0.05 was regarded as significant. (3) Results: The present study shows that E2F5 expression is upregulated in GC cancer cell lines compared to normal cell lines, and is positively associated with the level of HDACs and BCL2. HDACi and knocking down of E2F5 as tumor suppressors inhibited cell proliferation, migration invasion, and blocked the cell cycle in gastric cancer cells by suppressing BCL2. The results conclude that the anticancer mechanism of HDACi was determined by regulating E2F5 via targeting BCL2. (4) Conclusions: Our results suggest that the HDAC–E2F5–BCL2 signaling axis might be a novel potential biomarker in gastric cancer.