As a severe metabolic disease, type 2 diabetes mellitus (T2DM) has become a serious threat to human health in recent years. Gastrodin, as a primary chemical constituent in Gastrodia elata Blume, has antidiabetic effects. However, the possible mechanisms are unclear. The aim of the present study was to investigate the effects and possible mechanisms of gastrodin on the treatment of T2DM. In vivo, after treatment with gastrodin for 6 weeks, fasting blood glucose levels, blood lipid metabolism, and insulin sensitivity index values were remarkably reduced compared with those of the diabetic control group. The values of aspartate aminotransferase and alanine aminotransferase also showed that gastrodin alleviates liver toxicity caused by diabetes. Moreover, gastrodin relieved pathological damage to the pancreas in T2DM rats. In vitro, gastrodin alleviated insulin resistance by increasing glucose consumption, glucose uptake, and glycogen content in dexamethasone-induced HepG2 cells. The Western blotting results showed that gastrodin upregulated the expression of insulin receptors and ubiquitin-specific protease 4 (USP4) and increased the phosphorylation of GATA binding protein 1 (GATA1) and protein kinase B (AKT) in vivo and in vitro. Furthermore, gastrodin decreased the ubiquitin level of the insulin receptor via UPS4 and increased the binding of GATA1 to the USP4 promoter. Additionally, administration of the phosphatidylinositol 3-kinase (PI3K)/AKT signaling pathway inhibitors MK-2206 and LY294002 abolished the beneficial effects of gastrodin. Our results indicate that gastrodin promotes the phosphorylation of GATA1 via the PI3K/AKT pathway, enhances the transcriptional activity of GATA1, and then increases the expression level of USP4, thereby reducing the ubiquitination and degradation of insulin receptors and ultimately improving insulin resistance. Our study provides scientific evidence for the beneficial actions and underlying mechanism of gastrodin in the treatment of T2DM.