Gallic acid (GA) is a polyphenol natural compound found in many medicinal plant species, including pomegranate rind (Punica granatum L.), and has been shown to have antiinflammatory and antibacterial properties. Pomegranate rind is used to treat bacterial and fungal pathogens in Uyghur and other systems of traditional medicine, but, surprisingly, the effects of GA on antifungal activity have not yet been reported. In this study, we aimed to investigate the inhibitory effects of GA on fungal strains both in vitro and in vivo. The minimal inhibitory concentration (MIC) was determined by the NCCLS (M38-A and M27-A2) standard method in vitro, and GA was found to have a broad spectrum of antifungal activity, with MICs for all the tested dermatophyte strains between 43.75 and 83.33 μg/mL. Gallic acid was also active against three Candida strains, with MICs between 12.5 and 100.0 μg/mL. The most sensitive Candida species was Candida albicans (MIC = 12.5 μg/mL), and the most sensitive filamentous species was Trichophyton rubrum (MIC = 43.75 μg/mL), which was comparable in potency to the control, fluconazole. The mechanism of action was investigated for inhibition of ergosterol biosynthesis using an HPLC-based assay and an enzyme linked immunosorbent assay. Gallic acid reduced the activity of sterol 14α-demethylase P450 (CYP51) and squalene epoxidase in the T. rubrum membrane, respectively. In vivo model demonstrated that intraperitoneal injection administration of GA (80 mg/kg d) significantly enhanced the cure rate in a mice infection model of systemic fungal infection. Overall, our results confirm the antifungal effects of GA and suggest a mechanism of action, suggesting that GA has the potential to be developed further as a natural antifungal agent for clinical use. Copyright © 2017 John Wiley & Sons, Ltd.