Denise Huey

I don't think gravity was "invented" - more like discovered. Humans didn't 'invent' gravity. It was already there.

Mahesh Godavarti

Your question might start to make more sense if it was worded as "Who discovered gravity?" or "Who discovered the laws of gravity?"

The answer would be Sir Isaac Newton. Remember the famous apple story?

More on this here.