A pretty sofisticated setup (at the time) was preparated to prove the fairly established idea that light propagated through Aether.
Well, the failure of the experiment motivated a lot of scientists to improve and test other models.
I can't exactly recall right now, but Einstein's work was supported by the work of many other scientists.
It's not the case that at the time an alternative theory of gravity, space and time was unpopular, as you can see in the works of Lorentz and Minkowski for example.
Not to degrade Einstein's contribution, but to shed light on how the actual scientific process diverges from the popular perception (even among fairly educated people).
In quantum mechanics and analyzing the history of it's development this is much more evident. E.G. Max Planck on his solution to the Ultraviolet Catastrophe[1]: "My unavailing attempts to somehow reintegrate the action quantum into classical theory extended over several years and caused me much trouble."
0: https://simple.wikipedia.org/wiki/Michelson%E2%80%93Morley_e...