His error was to interpret perfectly good observational data in terms of a flawed theory. Scientists repeatedly return to established theories to test them in new ways, and tend towards testiness with those priests, religious or secular, who know the answers already -whatever the questions are. Science is not about building a body of known 'facts'. It is a method for asking awkward questions and subjecting them to a reality-check, thus avoiding the human tendency to believe whatever makes us feel good.
From the earliest times, humans have been interested not just in the shape of the world, but in the shape of the universe. To begin with, they probably thought that these were the same question. Then they worked out, using roughly the same sort of geometry as Eratosthenes, that those lights in the sky were a very long way away. They came up with an amazing range of myths about the sun-god's fiery chariot and so on, but after the Babylonians got the idea of making accurate measurements, their theories started to lead to surprisingly good predictions of things like eclipses and the motion of the planets. By the time of Ptolemy (Claudius Ptolemaeus, AD 100-160) the best model of planetary motion involved a series of 'epicycles', the planets moved as if they were rotating round circles whose centres rotated round other circles whose centres rotated round ...
Isaac Newton replaced this theory, and its more accurate successors, with a rule, the law of gravity; it describes how each body in the universe attracts every other body. It explained Johannes Kepler's discovery that planetary orbits are ellipses, and in the fullness of time it explained a lot of other things too.
After a few centuries of stunning success, Newton's theory ran into its first big failure: it made incorrect predictions about the orbit of Mercury. The place in its orbit at which Mercury came closest to the sun didn't move quite the way Newton's law predicted. Einstein came to the rescue with a theory based not on attractive forces, but on geometry, on the shape of spacetime. This was the celebrated Theory of Relativity. The theory came in two flavours: Special Relativity and General Relativity. Special Relativity is about the structure of space, time, and electromagnet-ism; General Relativity describes what happens when you throw in gravity too.
The main point to appreciate is that 'Relativity' is a silly name. The whole point of Special Relativity is not that 'everything is relative', but that one particular thing, the speed of light, is unexpectedly absolute. The thought experiment is well known. If you're travelling in a car at 50 mph (80 kph) and you fire a gun forwards, so that the bullet moves at 500 mph (800 kph) relative to the car, then it will hit a stationary target at a speed of 550 mph (880 kph), adding the two components. However, if instead of firing the gun you switch on a torch, which 'fires' light at a speed of 670,000,000 mph (186,000 mps or 300,000 kps), then that light will not hit the stationary target at a speed of 670,000,050 mph. It will hit it at 670,000,000 mph, exactly the same speed as if the car had been stationary.
There are practical problems in staging that experiment, but less graphic and dangerous ones have indicated what the result would be.
Einstein published Special Relativity in 1905, along with the first serious evidence for quantum mechanics and a ground-breaking paper on diffusion. A lot of other people, among them the Dutch physicist Hendrik Lorentz and the French mathematician Henri Poincare, were working on the same idea, because electro-magnetism didn't entirely agree with Newtonian mechanics. The conclusion was that the universe is a lot weirder than common sense tells us, although they probably didn't use that actual word. Objects shrink as they approach the speed of light, time slows down to a crawl, mass becomes infinite ... and nothing can go faster than light. Another key idea was that space and time are to some extent interchangeable. The traditional three dimensions of space plus a separate one for time are merged into a single unified spacetime with four dimensions. A point in space becomes an event in spacetime.
In ordinary space, there is a concept of distance. In Special Relativity, there is an analogous quantity, called the interval between events, which is related to the apparent rate of flow of time. The faster an object moves, the slower time flows for an observer sitting on that object. This effect is called time dilation.
If you could travel at the speed of light, time would be frozen.
One startling feature of relativity is the twin paradox, pointed out by Paul Langevin in 1911. Again, it is a classic illustration. Suppose that Rosencrantz and Guildenstern are born on Earth on the same day. Rosencrantz stays there all his life, while Guildenstern travels away at nearly lightspeed, and then turns round and comes home again. Because of time dilation, only one year (say) has passed for Guildenstern, whereas 40 years have gone by for Rosencrantz. So Guildenstern is now 39 years younger than his twin brother. Experiments carrying atomic clocks around the Earth on jumbo jets have verified this scenario, but aircraft are so slow compared to light that the time difference observed (and predicted) is only the tiniest fraction of a second.
So far so good, but there's no place yet for gravity. Einstein racked his brains for years until he found a way to put gravity in: let spacetime be curved. The resulting theory is called General Relativity, and it is a synthesis of Newtonian gravitation and Special Relativity. In Newton's view, gravity is a force that moves particles away from the perfect straight line paths that they would otherwise follow In General Relativity, gravity is not a force: it is a distortion of the structure of spacetime. The usual image is to say that space-time becomes 'curved', though this term is easily misinterpreted. In particular, it doesn't have to be curved round anything else. The curvature is interpreted physically as the force of gravity, and it causes light rays to bend. One result is 'gravitational lensing', the bending of light by massive objects, which Einstein discovered in 1911 and published in 1915. The effect was first observed during an eclipse of the Sun. More recently it has been discovered that some distant quasars produce multiple images in telescopes because their light is lensed by an intervening galaxy.
Einstein's theory of gravity ousted Newton's because it fitted observations better, but Newton's remains accurate enough for many purposes, and is simpler, so it is by no means obsolete. Now it's beginning to look as if Einstein may in turn be ousted, possibly by a theory that he rejected as his greatest mistake.
In 1998 two different observations called Einstein's theory into question. One involved the structure of the universe on truly massive scales, the other happened in our own backyard. The first has survived everything so far thrown at it; the second can possibly be traced to something more prosaic. So let's start with the second curious discovery.
In 1972 and 1973 two space probes, Pioneer 10 and 11, were launched to study Jupiter and Saturn. By the end of the 1980s they were in deep space, heading out of the known solar system. There has long been a belief, a scientific legend waiting to happen, that beyond Pluto there may be an as yet undiscovered planet, Planet X. Such a planet would disturb the motions of the two Pioneers, so it was worth tracking the probes in the hope of finding unexpected deviations. John Andersen's team found deviations, all right, but they didn't fit Planet X, and they didn't fit General Relativity either. The Pioneers are coasting, with no active form of propulsion, so the gravity of the Sun (and the much weaker gravity of the other bodies of the known solar system) pulls on them and gradually slows them down. But the probes were slowing down a tiny bit more than they should have been. In 1994 Michael Martin suggested that this effect had become sufficiently well established that it cast doubt on Einstein's theory, and in 1998 Anderson's team reported that what was observed could not be explained by such effects as instrument error, gas clouds, the push of sunlight, or the gravitational pull of outlying comets.