That's oversimplified. Vulcan (hypothetical planet) - Wikipedia has more detail on this hypothetical intra-Mercurian planet. Over much of the nineteenth century, several astronomers claimed to have observed some intra-Mercurian planet transit across the Sun, and some astronomers claimed to have seen it in total solar eclipses. However, it was hard to get a coherent orbit out of those observations, and many astronomers were not successful in making similar observations. So by the late 19th cy., astronomers had become skeptical about its existence, and some astronomers started speculating about modifying the law of gravity.A great historical example is the hunt for the planet Vulcan (https://news.nationalgeographic.com...ry-astronomy-theory-of-relativity-ngbooktalk/)
Essentially, astronomer's saw that Mercury's orbit did not match the predictions of Newtonian mechanics. Scientists therefore hypothesized that another undiscovered planet must be influencing the orbit of Mercury. We now know that mercury's orbit does not match the predictions of Newtonian physics because of
specialgeneral relativity. SpecialGeneral relativity accurately explains Mercury's orbit, "proving" that Vulcan does not exist.
Einstein's General Relativity was, it must be admitted, a modified-gravity theory.