  We propose a method based on the redshift dependence of the Alcock-Paczynski
(AP) test to measure the expansion history of the Universe. It uses the
isotropy of the galaxy density gradient field to constrain cosmological
parameters. If the density parameter $\Omega_m$ or the dark energy equation of
state $w$ are incorrectly chosen, the gradient field appears to be anisotropic
with the degree of anisotropy varying with redshift. We use this effect to
constrain the cosmological parameters governing the expansion history of the
Universe. Although redshift-space distortions (RSD) induced by galaxy peculiar
velocities also produce anisotropies in the gradient field, these effects are
close to uniform in magnitude over a large range of redshift. This makes the
redshift variation of the gradient field anisotropy relatively insensitive to
the RSD. By testing the method on mock surveys drawn from the Horizon Run 3
cosmological N-body simulations, we demonstrate that the cosmological
parameters can be estimated without bias. Our method is complementary to the
baryon acoustic oscillation or topology methods as it depends on $D_AH$, the
product of the angular diameter distance and the Hubble parameter.
