WASHINGTON—The U.S. economy lost some momentum in the first quarter after a spurt of faster growth last year, with consumers hunkering down after several months of robust demand while businesses powered ahead with stronger profits, revenue and investment.

Gross domestic product—the value of all goods and services produced in the U.S., adjusted for inflation—expanded at an annual rate of 2.3% for the months January through March to $17.4 trillion, the Commerce Department said Friday. That marked a slowdown from the 3% growth...