In 1905, at the age of 26, Einstein managed to extend Newton's theory for the motion of bodies at high speeds; by assuming that the speed of light is constant no matter how one is traveling (at a constant speed) he derived an extension to Newton's equations which holds true for every speed, not only for low ones.
Newton was still correct in that limiting case. These results however were valid only if the objects are moving at constant velocity; a replacement of Newton's send law which describes what happens when an object is accelerated was yet to be found. Einstein was the first person responsible of extending his theory of zero acceleration to a theory of non-zero acceleration.
It took him about 10 more years to come up with an answer. During this period he realized several things: first he assumed that a person cannot distinguish whether he is in a gravitational field or under constant acceleration, i.e. these two things are equivalent. This assumption provided a link between gravity and mass, or gravity and energy. He concluded then that mass and energy must affect the gravitational field.
Secondly, he stated that the gravitational field is not actually a force as Newton has described, but instead a curvature in space. To put it in simple words, the bodies are affected by gravity not because of a force directly exerted on them but because space is curved and therefore they have to follow space's grid. The presence of mass or energy does not affect the bodies directly; it affects the space first, and then the bodies move in this curved space. Earth always moves in a straight line (not in the Euclidian sense though). The presence of sun curves space, and therefore curves this straight line and forces earth to appear to be moving in an ellipse.
It is very difficult for an average person to realize what this really means, but I have a favorite analogy: imagine being in a sea (or pool) using your finger to create ripples on the water. The presence of your finger in the water creates these waves and alters the geometry of water, it's not flat anymore. If you look through the rippled water you'll see the bottom distorted.
Well, the same things happens to 3D space if you try to move your finger like that on the air! Your finger has mass and it actually can create ripples in space... The only reason you cannot see them as in the water is that the mass of your finger is so small that the ripples it creates are of the tiniest magnitude; there are so small that do not affect anything considerably.
However it has been found to be true when bigger and more massive objects such as neutron stars or black holes are carefully studied. If we were able to stick a black hole into our fingertip, then by moving the finger in thin air we would indeed see these ripples. Just the sole idea that this is already happening even at a microscopic level is at least fascinating.
This idea, that space can be bended by mass, has breathtaking ramifications. Since mass curves space and then the objects just move on this space, there is no reason why for example light couldn't follow space's curvature.
Indeed, one of Einstein's first ideas was that light should be able to bend too, when massive objects exist close to it. In 1913 (before fully completing his theory) he made some interesting calculations: considering the Sun as a massive object, would the light from a star behind the sun that passes close to him be bended by its gravity?
By making some calculations, he figured that the angle which the light ray from such a star is bended is indeed measurable. He quickly send a letter to Hale at the Mt. Wilson observatory in Los Angeles and asked how could they measure this deflection. If his theory was true, then the star should appear to be in a different position that it was expected according to the astronomical catalogues.
Hale responded that since no stars are visible during daylight, the only way they could measure it was during a solar eclipse; at that time the sun's light is blocked, and the stars in the sky are easily detected then. However the amount of bending that Einstein predicted was not correct: it was off by a factor of 2 (his theory was yet incomplete at the time).
The next scheduled solar eclipse was to take place in Russia, in 1915. Some German scientists were intrigued by Einstein's idea, and went in Russia that summer to measure this (erroneous) deflection. However while they were in Russia World War I broke out; the German scientists were captured by the Russians and Einstein's incorrect theory was never disproved.
(Can you imagine what would have happened if they indeed measured the wrong bending? Einstein would have proven to be wrong, and since he was not so famous by then he might never had a second chance to prove himself. Life plays interesting games, huh?).
When the war ended 2 experimental teams leaded by Sir Arthur Eddington set off to measure the light deflection at solar eclipse, at 1919. By that time Einstein had figured out the correct equations of his general relativity theory, and found the exact amount of bending. At the crucial day of the solar eclipse the two teams collected the data and then compared them to Einstein's theoretical predictions: the matching was superb for the accuracy they had at the time.
The next day Einstein's face was in newspapers all over the world: by predicting light bending was by itself incredible, and the confirmation made him quickly the most famous scientist ever, even to the large masses of people. Two years later we won the Nobel prize in physics (not for his work in relativity, ironically).