Gravitational energy has actually been in wide spread use for centuries. Rivers flow downhill. People dammed them and made them flow over water wheels. They used the energy to mill grain into flour. Now they make much bigger dams, and generate electricity by making water flow through turbines attached to generators.
We don't run out of water because the sun heats the ocean. Water evaporates and rises into clouds. Rain replenishes the rivers. So the energy ultimately comes from the sun.
Eventually we will run out of solar energy. Energy in the sun comes from nuclear fusion. Hydrogen is turning into Helium. In a few billion years, the sun will run low on Hydrogen. It will begin burning Helium. This will cause the sun to swell and destroy the Earth. But human activity will not affect that one way or another.
Dams do affect things around us. But not in the way you mean. Raising and lowering water, or anything else, does change the rotational velocity of the Earth. Like a spinning ice skater pulling in her arms, moving things downhill makes the Earth spin faster, and shortens days just a bit. But the effect is tiny.
The Earth's rotation is extremely steady. Variations in day length may add up to 1 second over the course of a few years. There are many causes, some very small, others miniscule. Not all of them are understood. Snow piles up on land in winter. In summer, it melts and flows into the ocean. Meteors hit the earth. Magma flows deep in the Earth. All of these are larger than changes due to dams.