Why did no one before Einstein realized that time is relative? If you think about it, it is supposed to be obvious.
It was already proven that the speed of light is constant in all reference frames.
So for the equation $v=x/t$ to be true, when $v$ equals $c $, in all reference frames, t must change.
How did no one in the science community realized it after it was proven that the speed of light is constant in all reference frames?
 A: 
It was already proven that the speed of light is constant in all reference frames. 

Actually, no it wasn't. In fact, that was the essence of Einstein's alternative interpretation. What was known was that according to Maxwell's Equations the speed of light is independent of the speed of the source of that light. The natural interpretation of this fact was that Maxwell's Equations hold only in the reference frame of some medium (in analogy with sound). The idea that Maxwell's Equations hold in all (inertial) reference frames, and therefore the speed of light has the same value in all frames because of a fundamental relativity of time intervals was (at least in its most thoroughly articulated form) Einstein's idea.
A: Occam's razor.
Since they only observed light as a wave, they assumed it behaved like all other waves, where $v = \frac{x}{t}$ is true relative to the speed of the medium it's in. Just like you don't need to change the rate of flow of time to explain the speed of sound waves, ocean waves, or waves on a spring, there'd be no reason to think you'd need to do that for light until you found out there is no medium that they travel through.
This was the big shock of the Michelson-Morely experiment. 
Also, Einstein was not the first to think of this idea, he was just the first to put it together in a self-consistent theory that made predictions. Lorentz transformations had been around for 20 years or so when Einstein began his work (which proved very helpful for him...)
A: The thinking at the time was that there was only one physically correct reference frame and that other inertial frames related to it via the Lorentz transformations were just mathematical fictions. The Ether was supposed to single out the physically correct reference frame. 
A: "It was already proven that the speed of light is constant in all reference frames."
This is a myth. The opposite was proven in 1887 (prior to FitzGerald and Lorentz advancing the ad hoc length contraction hypothesis): The Michelson-Morley experiment was compatible with the variable speed of light posited by Newton's emission theory of light and accordingly incompatible with the constant (independent of the speed of the source) speed of light posited by the ether theory and later adopted by Einstein as his 1905 second postulate:
"Emission theory, also called emitter theory or ballistic theory of light, was a competing theory for the special theory of relativity, explaining the results of the Michelson–Morley experiment of 1887. [...] The name most often associated with emission theory is Isaac Newton. In his corpuscular theory Newton visualized light "corpuscles" being thrown off from hot bodies at a nominal speed of c with respect to the emitting object, and obeying the usual laws of Newtonian mechanics, and we then expect light to be moving towards us with a speed that is offset by the speed of the distant emitter (c ± v)."  https://en.wikipedia.org/wiki/Emission_theory
"The Michelson-Morley experiment is fully compatible with an emission theory of light that CONTRADICTS THE LIGHT POSTULATE."  http://philsci-archive.pitt.edu/1743/2/Norton.pdf
