What is the origin of the prediction that the world will end in 2012?

According to NASA scientists:

"The story started with claims that Nibiru, a supposed planet discovered by the Sumerians, is headed toward Earth. This catastrophe was initially predicted for May 2003, but when nothing happened the doomsday date was moved forward to December 2012. Then these two fables were linked to the end of one of the cycles in the ancient Mayan calendar at the winter solstice in 2012 -- hence the predicted doomsday date of December 21, 2012."

A most detailed account on the origin is the prediction is given by the Space Scientist David Morrison:

"The story started with claims that Nibiru, a supposed planet discovered by the Sumerians, is headed toward Earth. Zecharia Sitchin, who writes fiction about the ancient Mesopotamian civilization of Sumer, claimed in several books (e.g., The Twelfth Planet, published in 1976) that he has found and translated Sumerian documents that identify the planet Nibiru, orbiting the Sun every 3600 years. These Sumerian fables include stories of “ancient astronauts” visiting Earth from a civilization of aliens called the Anunnaki. Then Nancy Lieder, a self-declared psychic who claims she is channeling aliens, wrote on her website Zetatalk that the inhabitants of a fictional planet around the star Zeta Reticuli warned her that the Earth was in danger from Planet X or Nibiru. This catastrophe was initially predicted for May 2003, but when nothing happened the doomsday date was moved forward to December 2012. Only recently have these two fables been linked to the end of the Mayan long-count at the winter solstice in 2012 – hence the predicted doomsday date of December 21, 2012"