Nonlinear diffusion ∂tρ = ∆(Φ(ρ)) is considered as the hydrodynamic limit of the zero- range process. It is shown that for suitable choices of Φ, a metric can be defined with respect to which the non-linear diffusion is the gradient flow of the thermodynamic entropy of the zero-range process. Hence we call this metric the thermodynamic metric. This exhibits the thermodynamic entropy as a Lyapunov functional. The thermodynamic metric is also linked to the large deviation principle for the hydrodynamic limit of the underlying zero range process