Special relativity really needs the michelson morley experiment of 1887.
General relativity requires a further development of differential geometry, the base version having been published in 1900 by ricci and leviCivita.
We could possibly get the Michelson-Morley experiment to occur earlier if we just make Maxwell realize how increasingly complex and unlikely his own gears-and-wheels-model of the aether is, and inspired by his friend Michael Faraday, call for experimental investigation into the subject. If so, then we could actually have Maxwell develop the Lorentz transformations and other equations of Special Relativity prior to his death (whether or not he'll, like Einstein, throw the concept of the aether out of the window I leave up to Rridgway).
If we want him to develop General Relativity, then as you said, getting Tensor Analysis to reach 1900s levels 40-20 years in advance, we're looking at quite some intricate butterflies we need to figure out when and where to place...