In height h there is no kinetic energy because the speed is zero. Work, describe the amount of energy that, from one kind transform to another. And here we have two kind of energies. Chemical (from your muscles to lift the mass) and dynamic when mass left at h. We would have kinetic energy if you drop the mass upward, like we are doing playing with a cοin. Because you would have accelerated it. If you gave much acceleration so the mass go higher that h , the time reach the h , would have kinetic energy, and if would hit something in that h height, it could move it, and we would have produced work. If the mass in the way to it's upward moving, would stop exactly to the h, then, there would have zero speed, and then would come down. But now, at h, the only kind of energy we have is dynamic. We have kinetic energy when left the mass fall down from h to the ground, were the kinetic energy will take the max and dynamic energy will take min (0). Word "done" in "the work done against gravity in lifting an object" make it difficult to understand. The right word is produced (if the force cause or help the movement of the point of application) or consumed (if the force resist or impede the movement of the point of application). Here the word is produced. The work of any conservative force which move a mass from one position to the other, do not depend from the way, or path that the mass follows but only from these two positions. It means that, before you put the mass to h, you can take it and go to your house or make a trip with it and after you put it on h. Given that the two points (ground and h ) are the same, the work always be the same, regardless of whether you got tired of your hand to keep the mass. Nature do not care how the mass went from ground to h, but only to go to h. And something else to help you understand meanings of definitions. Energy comes from Greek words en (inside) and ergon (work). It means, the work an object can give ( hidden inside it) due to his position ( dynamic), movement (kinetic), etc. So the work produce against gravity in lifting an object of mass m through a vertical distance is mgh" do not mean how much Kcal you spent but how much energy you gave to the masss, by placing it on height h.