In 1905, Albert Einstein determined that the laws of physics are the same for all non-accelerating observers, and that the speed of light in a vacuum was independent of the motion of all observers. This was the theory of special relativity. It introduced a new framework for all of physics and proposed new concepts of space and time.
Einstein then spent 10 years trying to include acceleration in the theory and published his theory of general relativity in 1915. In it, he determined that massive objects cause a distortion in space-time, which is felt as gravity.