Coherent control of atomic motion in an optical lattice for precise measurements of gravity