Vasudevan Mukunth in The Wire:
On February 8, 1917, Einstein published a paper titled ‘Kosmologische Betrachtungen zur allgemeinen Relativitätstheorie‘ (‘Cosmological Considerations in the General Theory of Relativity’). In it, he described a number called the cosmological constant. The constant had a value such that, when used in his newly created equations describing the behaviour of the gravitational force, a non-changing universe was spit out – agreeing with knowledge at the time, as well as his belief, that the universe was static. Without the constant in the picture, on the other hand, Einstein’s general theory of relativity suggested that the gravitational pull of masses contained in the universe would pull all the matter together, keeping the universe dynamic.
It would be more than a decade before evidence would begin to emerge that the universe was expanding. And it would be scores of years before astronomers would find that the expansion was also accelerating. Then again, it would be many years before Einstein realised his actual mistake.
While he popularly considered his addition of the constant to be an affront to his own work, it may not have been as bad as he thought. The cosmological principle states, rather assumes, that the universe at the largest scales has the same properties everywhere. This is a spatial definition. An extension called the ‘perfect’ cosmological principle states that the universe at the largest scales has the same properties everywhere and at every time, implying that it has always remained the way it is today and it will continue to be this way forever. This is also called the steady-state theory, an alternative to the Big Bang theory that has been widely discredited – and which Einstein himself pursued for a while in 1931.
Anyway, in defence of Einstein, theoretical astrophysicist Peter Coles writes on his blog, “General relativity, when combined with the cosmological principle, but without the cosmological constant, requires the universe to be dynamical rather than static. If anything, therefore, you could argue that Einstein’s biggest blunder was to have failed to predict the expansion of the Universe!” Indeed, if Einstein had not decided to fudge his own monumental equations, he may have been onto something.
More here.