By Josh Mitchell 

The U.S. economy entered 2015 on the most robust streak of consumer spending in years, yet when the first growth figures for 2014 came out Friday they underscored the lack of vigor in the current expansion.

Gross domestic product, the broadest measure of goods and services produced across the U.S., notched an annual growth rate of 2.4% for 2014, the government said Friday, just a touch better than the sluggish average of the nearly six-year-old recovery--and far from the 4% growth of the late 1990s. Fourth-quarter GDP was 2.6%, roughly half the summer's blowout 5% pace, which was aided in part by a spree of military purchases that wasn't repeated.

The report offered both hope and red flags for the world's largest economy. Households, boosted by a surge in hiring and a slide in gasoline prices, went on their biggest spending spree in almost nine years in the fourth quarter amid signs of rising consumer confidence.

But U.S. companies suffered a dual blow. Imports rose briskly as Americans bought foreign goods that were effectively made cheaper by the strengthening dollar. And the slumping world economy tamped down demand for U.S. exports. That caused the trade gap to widen, slicing a percentage point off economic growth.

Businesses also reined in capital spending, particularly on equipment, after stepping up such outlays in the spring and summer.

"Outside of consumer spending, it's hard to argue for a lot of momentum, " said Scott Hoyt of Moody's Analytics. But "if consumers do keep up their spending, as we add jobs and wage income increases, that should lift a lot of boats."

Stock investors sent markets sharply lower after the report. The Dow Jones Industrial Average dropped 251.90 points, or 1.4%, to 17164.95. The Standard & Poor's 500 fell 26.26 points, or 1.3%, to 1994.99. For the month, the Dow lost 3.7% and the S&P 500 fell 3.1%.

The October-through-December period wrapped up another year of halting progress for the recovery. The year began bleakly, with a weather-driven 2.1% drop in GDP, then took off through the spring and summer.

Now, gathering global turbulence presents another obstacle that could prevent the U.S. economic expansion from achieving higher sustained growth in the near term.

But Federal Reserve officials, private-sector economists and market analysts largely shook off the disappointing fourth-quarter figures, pointing instead to the growing appetite of U.S. households as a sign the recovery remained firmly on track.

Scott Wren, senior equity strategist at Wells Fargo Investment Institute, said he's not concerned about a global economic slowdown.

"We're going to see better economic growth here and stabilization abroad, " he said. Economic growth boosts expectations for corporate earnings, a main driver of stock prices. Mr. Wren said he expected moderate earnings growth to help stocks gain this year, but not as much as in recent years.

Some Fed officials also appeared unfazed, days after the central bank gave an upbeat assessment of the economy. "There is a lot of underlying momentum in the U.S.," St. Louis Fed President James Bullard said on Bloomberg TV after the GDP report.

Many economists, while confident the U.S. will see growth of about 3% this year, expect the current quarter to stick to a similar pace as the last one as companies draw down inventories. But a replenishment of inventories should provide a boost to the U.S. economy in the spring. Forecasting firm Macroeconomic Advisers forecasts 2.4% growth in January through March; Moody's Analytics pegs it at 3.1%.

Separate reports Friday highlighted challenges ahead. Consumer prices in the eurozone fell sharply in January, raising the risk of deflation despite new stimulus efforts from the European Central Bank.

And in the U.S., workers' wages are still showing little strength, renewing concerns that middle-class workers are being left behind and that economic gains aren't being widely spread.

Wolfe's Baldwin Brass Center in Malvern, Pa., is seeing the unevenness of the recovery up close. The store, near Philadelphia, sells decorative hardware such as door locks and cabinet handles.

Sales have been "steady" of late, said owner Ann Marie Gillinger, but most of the business is coming from high-end customers--contractors building million-dollar-plus homes. Business is stagnant among contractors that work on middle-income homes.

"It's the higher-end market that's busy, but your regular customers are still not in the buying mode," Ms. Gillinger said. "They're not seeing the economy having gotten that much better."

Some companies are optimistic consumers will further pick up spending in 2015, particularly as cheaper gasoline prices save them billions. Visa Inc. said this past week that three-quarters of its customers are using lower spending at the pump to boost savings or reduce debt.

Some retailers say the benefits of lower gasoline prices--which have fallen more than 50% since June--have yet to fully surface. Todd Teske, chief executive of Briggs & Stratton Corp., a Wisconsin maker of engines used in lawn mowers and other outdoor equipment, said signs point to higher consumer spending in coming months.

"The ultimate impact on retail spending and on sales of lawn and garden equipment is yet to be seen," Mr. Teske said in a call with analysts this past week. "However, we are encouraged that consumers have more discretionary income this spring."

He pointed to a recent pickup in new-home construction as a sign the housing industry is poised to advance this year as pent-up demand is unleashed, a development that would stoke the broader economy.

For now, the construction industry remains weak, in part because of subdued government spending. Overall government outlays fell at a 2.2% pace last quarter, reflecting a drop in defense spending. But state and local governments have only modestly increased outlays.

That's holding back companies like Manhattan Road & Bridge Co., a highway contractor in Tulsa, Okla., that rely on public-works projects. The firm recently won bids to build two bridges on a local interstate, said Rich Horrocks, vice president of the company's operations in Oklahoma and northwest Arkansas

Sales in recent weeks have been up roughly 10% from a year ago, but competition is tight and the business is choppy from month to month, he said. The 500-worker company is holding off on hiring or investing in new equipment.

The lack of a long-term federal highway-construction bill--with Congress instead passing a series of short-term funding extensions--has kept companies like his on edge, Mr. Horrocks said.

"If we knew the highway program was going to be there longer, the next few months we would probably do more investing in equipment infrastructure of our own and hiring more people," Mr. Horrocks said. "We're always on the edge of that running out so we're leery of making any big investments."

Write to Josh Mitchell at joshua.mitchell@wsj.com