Young earth creationism (YEC) holds that the creation of the universe took place (a) approximately 6000 years ago, and (b) lasted exactly six days.
Pre-Scientific Views
The first part, a 6000-year-old universe, was a common belief among Christians and Jews until the advent of modern geology in the 18th century. Many Christians over the centuries have attempted to use the Bible's chronologies to calculate the age of the universe. The best known of these was Bishop James Ussher, who published a chronology in 1650 stating that the universe was created on October 23, 4004 BC.
The second part, a literal six days, is of more recent origin. Ancient Christians generally held that creation happened instantaneously or that the days were either unspecified periods or represented 1000 years each.
The early reformers Martin Luther and John Calvin sought to discern the plain meaning of the text, and promoted belief in a 6000-year-old earth and a six-day creation. When Copernicus' De revolutionibus orbium coelestium was published, Luther and Calvin argued that a geocentric universe was the Biblical view.
Within about two generations Copernicus' views won the day, and the Bible's references to a geocentric earth were ignored. The 6000-year-old earth remained a popular belief until the 18th century, when Scottish scientist James Hutton published Theory of the Earth; or an Investigation of the Laws observable in the Composition, Dissolution, and Restoration of Land upon the Globe, laying the groundwork for modern geology, including the geologic time scale. Studies of rock strata convinced most scientists that the earth was much older than had been previously thought. By the 19th century, estimates of the age of the earth were in the millions of years. Most Christians at the time were prepared to accept the conclusions of geologists.
But then Ellen G White, founder of the Seventh Day Adventist movement, claimed that God had showed her visions of the creation of the universe and that it had literally happened in six days. (sources: 1 2 3)
Modern Young-Earth Creationism
The first attempt to give YEC a scientific footing was in 1906 when Adventist George McCready Price published a book titled Illogical Geology: The Weakest Point in the Evolution Theory in which he advanced the idea that geological strata were produced by Noah's flood. Though he had no formal training in geology, Price claimed to have "firsthand knowledge of field geology" due to having traveled extensively. Price's views were not taken seriously among geologists, and was not influential even among evangelical Christians for half a century.
In the 1950s, the seeds of the modern YEC movement were planted in reaction to two events. In 1954 evangelical theologian Bernard Ramm published The Christian View of Science and Scripture, which sought to reconcile scripture and modern science. Five years later, 1959 saw worldwide recognition of the centennial anniversary of Darwin's On the Origin of Species.
In response, hydraulic engineer Henry Morris (who acknowledge Price's influence) teamed with John Whitcomb, a Bible teacher who had studied some geology in college, to write The Genesis Flood which was published in 1961. The Genesis Flood brought Price's flood geology to mainstream evangelicals and kickstarted the creation science movement.
So YEC in its modern form—as an alternative to mainstream science—started to become popular in the 1960s, although its roots stretch back a little more than a century.