By generalizing the Kubo-Streda formula for calculating electrical conductivities to the thermoelectric coefficients, we theoretically study the anomalous Nernst effect (ANE) on the surface of a topological insulator induced by a finite concentration of magnetic impurities. The ANE is found to be modulated by the impurity scattering and thermal fluctuations, simultaneously, and so exhibits rich structures in the energy space. While the anomalous Hall conductivity is half-integer quantized with the Fermi level across the magnetic-impurity-induced gap, the anomalous Nernst signal (ANS) is fully suppressed and the thermopower is linear-dependent on the Fermi energy. Around the magnetic-impurity-induced localized levels, the ANS and thermopower are resonant enhanced. The suppression and enhancement of the thermoelectric coefficients will compete with each other as the magnetic impurity potential increases continually. More interestingly, when a finite charge potential is included, the resonant peaks of the ANS and thermopower will be renormalized, making the signs of the ANS and thermopower tunable by the strength of the charge potential.