Einstein realized that gravity is due to the curvature of spacetime, but earlier mathematicians had guessed that it's due to the curvature of space.
On the 18th of August 1869, the eminent mathematician Sylvester gave a speech arguing that mathematics is not separate from physics. He later published this speech in the journal Nature, and added a footnote raising the possibility that space is curved:
“the laws of motion accepted as fact, suffice to prove in a general way that the space we live in
is a flat or level space [...], our existence therein being assimilable to the life of the bookworm in a flat page; but what if the page should be undergoing a process of gradual bending into a curved form?”
Then, even more dramatically, he announced that the mathematician Clifford had been studying this!
“Mr. W. K. Clifford has indulged in more remarkable speculations as the possibility of our being able
to infer, from certain unexplained phenomena of light and magnetism, the fact of our level space
of three dimensions being in the act of undergoing in space of four dimensions (space as
inconceivable to us as our space to the supposititious bookworm) a distortion analogous to the
rumpling of the page.”
This started a flame war in Nature which the editor eventually shut off. Clifford later wrote about his theories in a famous paper:
https://en.wikisource.org/wiki/On_the_Space-Theory_of_Matter
But now I hear that maybe Clifford even did experiments to TEST his ideas by measuring the polarization of the skylight during a solar eclipse in Sicily on December 22, 1870:
• S. Galindo and Jorge L. Cervantes-Cota, Clifford's attempt to test his gravitation hypothesis, https://arxiv.org/abs/1807.09230
The amazing prehistory of general relativity!