What was wrong with that?

Electromagnet
When electromagnets were studied, our picture of space and time changed, too.
Newton's model for gravity looked pretty good until scientists started learning more about the force of electromagnetism.
They learned that light was made of electromagnetic waves, and they could model the observed behavior of light very well by looking at solutions of the wave equation for the electromagnetic field.
When they looked at those wave equations, they could see that causality and Special Relativity were both already there. The mathematical equations that modeled electromagnetism were consistent with causality and Special Relativity.
But Newton's law of gravitation depends only on the distance between two massive objects at a given moment in time. Newton's law doesn't model what happens when the gravitational field changes in time. There was no wave equation to be had from Newton's model of gravity, and there wasn't a way to make it consistent with causality and Special Relativity. (Plus, Newton had spent a lot of time convincing himself that light was not wavelike in nature, so his theories really needed updating by the time electromagnetism came around.)
This was where Einstein came in. Not only did Einstein give us the Special Theory of Relativity, but in his quest to make gravity consistent with Special Relativity, he invented the General Theory of Relativity.
And what a can of worms that opened up, as we shall see later.