The U.S. economy grew at its fastest pace in two years, as a recovery that has otherwise chugged along in fits and starts builds up a head of steam going into the new year.

The government's main growth gauge—gross domestic product—grew at a 4.1% annual rate in the third quarter, marking only the second time since the recovery began in 2009 that the output of goods and services expanded above 4%. Friday's report showed consumer...