An important problem in statistical physics concerns the fascinating connections between partition functions of lattice models studied in equilibrium statistical mechanics on the one hand and graph theoretical enumeration problems on the other hand. We investigate the nature of the relationship between the number of spanning trees and the partition function of the Ising model on the square lattice. The spanning tree generating function T(z) gives the spanning tree constant when evaluated at z=1, while giving the lattice green function when differentiated. It is known that for the infinite square lattice the partition function Z(K) of the Ising model evaluated at the critical temperature K=K_{c} is related to T(1). Here we show that this idea in fact generalizes to all real temperatures. We prove that [Z(K)sech2K]^{2}=kexp[T(k)], where k=2tanh(2K)sech(2K). The identical Mahler measure connects the two seemingly disparate quantities T(z) and Z(K). In turn, the Mahler measure is determined by the random walk structure function. Finally, we show that the the above correspondence does not generalize in a straightforward manner to nonplanar lattices.