When you lift an object a distance Δy above the ground, gravity does negative work on the object, equal to $W=-Fd=-mg\Delta y$. If we lower the ball back down to the same position, then the gravity is doing positive work, and the work is $W=+Fd=+mg\Delta y$: the work that was stolen by gravity initially is given right back to the ball, as if gravity were merely holding onto it for safekeeping. In fact, that's exactly how physicists imagine it: an object in a gravitational field has a store of energy called its gravitational potential energy $E_G$ (or sometimes just potential energy for short). When an object moves higher off the ground, energy is stolen from the motion (so that the ball slows down for instance) and stored in the potential energy, increasing it by mgh. When the object is allowed to drop, on the other hand, potential energy is given to the object, and so the potential energy drops by that same amount:
When the ball goes up, gravity steals energy from the motion and stores it in the potential energy "tank" $E_G$, which rises. $$\Delta E_G=+mgh$$
When the ball goes down, gravity gives energy to the motion, depleting the "tank". $$\Delta E_G=-mgh$$
Instead of thinking about gravity problems in terms of the work done by gravity, we can think instead about objects having a certain gravitational potential energy instead, which is given by the formula
$$E_G=mgh$$
where $m$ is the mass of the object, $g=9.8\u{N/kg}$ as usual, and $h$ is the height of the object above some origin (e.g. the ground or the table). The higher an object is, the more gravitational potential energy it has. If an object falls, its gravitational potential energy is converted into kinetic energy, and the object moves faster and faster the lower it gets (unless other forces convert the energy into thermal energy or other forms: this is what happens when the object reaches terminal velocity).