After recapitulating the covariant formalism of equilibrium statistical mechanics in special relativity and extending it to the case of a non-vanishing spin tensor, we show that the relativistic stress-energy tensor at thermodynamical equilibrium can be obtained from a functional derivative of the partition function with respect to the inverse temperature four-vector beta. For usual thermodynamical equilibrium, the stress-energy tensor turns out to be the derivative of the relativistic thermodynamic potential current with respect to the four-vector beta, i.e. T^{mu u} = - partial Phi^mu/partial beta_ u. This formula establishes a relation between stress-energy tensor and entropy current at equilibrium possibly extendable to non-equilibrium hydrodynamics.