The most commonly applied wood preservatives are based on creosote, pentachlorophenol, and waterborne chromate copper arsenate, which negatively affect the environment. Thus, environmentally friendly wood preservatives are required. This study investigated the antifungal activity and mechanism of several long-chain alkyl gallates (3,4,5-trihydroxybenzoates) against white-rot fungi, Lenzites betulina and Trametes versicolor. The results revealed that octyl gallate (OG) had the best antifungal activity. Additionally, OG may have a mechanism of action similar to surfactants and inhibit ATPase activity, causing mitochondrial dysfunction and endogenous reactive oxygen species (ROS) production. Upon exposure to endogenous ROS, cells rapidly inhibit the synthesis of 60S ribosomal subunits, thus reducing the mycelial growth rate. L. betulina and T. versicolor also remodeled their energy metabolism in response to low ATP levels and endogenous ROS. After OG treatment, ATP citrate synthase activity was downregulated and glycolytic activity was upregulated in L. betulina. However, the activity of aerobic pathways was decreased and the oxidative branch of the pentose phosphate pathway was redirected form nicotinamide adenine dinucleotide phosphate (NADPH) to minimize endogenous ROS-mediated damage in T. versicolor. Taken together, these observations reveal that OG is a potent inhibitor of white-rot fungus. Further structural optimization research and pharmacological investigations are warranted.