Gravity is a fundamental force of the universe, so it was not "invented" by anyone.
The effects of gravity have been observed since prehistory. However a scientific understanding of gravity did not really begin until the Renaissance.
Leonardo da Vinci was the first to observe that gravity has a rate of acceleration.
Isaac Newton was the first to develop a mathematical equation for gravity that accurately measured the force of gravity both on Earth and between the Sun, Moon and other planets.
Also see What is gravity.