We propose a new non-perturbative method to compute derivatives of gauge coupling constants with respect to anisotropic lattice spacings (anisotropy coefficients). Our method is based on a precise measurement of the finite temperature deconfining transition curve in the lattice coupling parameter space extended to anisotropic lattices by applying the spectral density method. We determine the anisotropy coefficients for the cases of SU(2) and SU(3) gauge theories. A longstanding problem, when one uses the perturbative anisotropy coefficients, is a non-vanishing pressure gap at the deconfining transition point in the SU(3) gauge theory. Using our non-perturbative anisotropy coefficients, we find that this problem is completely resolved.