The U.S. economy stumbled during the first months of the year, as consumers reined in spending despite a rise in household confidence and a surge in stock prices that greeted the inauguration of President Donald Trump.

Gross domestic product, a broad measure of national output, grew at a 0.7% annual rate in January through March, the slowest pace of expansion in three years, the Commerce Department said Friday. Americans sharply cut back spending on big-ticket items like cars, causing overall consumer purchases to grow at...