Was it Einstein? Or was there someone before him to hypothesise this?
The first metric theory of gravitation, in which the effects of gravitation are treated entirely in terms of the geometry of curved spacetime, was published by Finnish physicist Gunnar Nordström in 1913. Einstein published his own theory of general relativity in 1915.
The measurement of the deflection of light passing close to the Sun during the solar eclipse of 1919 (the Eddington experiment) produced results that agreed with Einstein's theory, whereas Nordström's theory predicted no deflection. Nordström subsequently nominated Einstein for the Nobel Prize in Physics.
The first person that I know of was the mathematician and physicist William Clifford who, on reading the Habilitationsschrift of Riemann and, almost forty years before Einstein developed general relativity, hypothesised that not only all motion was due to the curvature of space but so was matter.
This is amazingly prescient considering that Einstein only showed that gravity could be interpreted as the curvature of spacetime. However, modern unified theory also shows that the electromagnetic, the weak and the strong force can also be interpreted via curvature - not now of spacetime - but of a bundle over spacetime. Moreover, the hypothetical supersymmetry which assumes a symmetry between bosons and fermions, show that matter ought to be, if supersymmetry is correct, also an aspect of curvature.
It's interesting to speculate how much of Clifford's work was known by Einstein. It would be extraordinary if had not at least known about it, given his own preoccupations. Also, it is interesting to speculate how much of his unified field work also went down the same path as Clifgord - that is to imagine all forces and all matter was an aspect of matter.
Riemann's Habilitationsschrift was published in 1854 essay and was titled, On the Hypotheses which lie at the Bases of Geometry. Clifford translated the essay in 1867 and three years later, he reported to the Cambridge Philosophical Society the curved space concept of Riemann's including his hypothesis that both space and matter were the effects of curvature. A further three years later, his translation was published in Nature. In 1876, his report to the society was published as The Space Theory of Matter in their Proceedings.
Riemann himself suggested something similar, but his was a more general comment in the microstructure of space, closer in spirit to Wheelers spacetime foam.