It is known from the work of F. Otto (2001) [9], that the space of probability measures equipped with the quadratic Wasserstein distance, i.e., the 2-Wasserstein space, can be viewed as a Riemannian manifold. Here we show that when the quadratic cost is replaced by a general homogeneous cost of degree p>1, the corresponding space of probability measures, i.e., the p-Wasserstein space, can be endowed with a Finsler metric whose induced distance function is the p-Wasserstein distance. Using this Finsler structure of the p-Wasserstein space, we give definitions of the differential and gradient of functionals defined on this space, and then of gradient flows in this space. In particular we show in this framework that the parabolic q-Laplacian equation is a gradient flow in the p-Wasserstein space, where p=q/(q−1). When p=2, we recover the Riemannian structure introduced by F. Otto, which confirms that the 2-Wasserstein space is a Riemann–Finsler manifold. Our approach is confined to a smooth situation where probability measures are absolutely continuous with respect to the Lebesgue measure on Rn, and they have smooth and strictly positive densities.