The U.S. economy shrank for the first time in more than three years in the fourth quarter, underscoring the halting nature of the recovery. But the strength of consumer spending and business investment suggested that the economy will grow, albeit slowly, this year.

Gross domestic product—the broadest measure of goods and services churned out by the economy—fell at a 0.1% annual rate in the fourth quarter of 2012, according to the government's initial estimate out Wednesday.

...