By Kate Davidson 

WASHINGTON--The U.S. economy accelerated modestly in the second quarter after a slow start to 2015, but growth this year is still less than last year's tepid first half and is well below the overall pace of the recovery.

Gross domestic product, the broadest measure of goods and services produced across the economy, grew at a 2.3% seasonally adjusted annual rate in the second quarter, the Commerce Department said Thursday.

Economists surveyed by The Wall Street Journal had forecast 2.7% growth.

The Commerce Department also said the economy grew at a 0.6% rate in the first quarter, an upward revision from a previously reported 0.2% contraction.

The latest figures repeat a common pattern in recent years: a slump at the start of the year, followed by a bounce back in the spring and summer. That has worked out to mediocre growth over the past six years, with no sustained breakout for the economy since the end of the recession in 2009.

"The pace for growth remains extremely weak by past recovery standards, but with potential growth weaker as well it appears to be more than sufficient to keep the unemployment rate coming down," Jim O'Sullivan, chief U.S. economist at High Frequency Economics, said in a note to clients.

Newly revised data show the expansion was weaker than previously thought. From 2012 through 2014, GDP increased at an average annual rate of 2%, according to three years of revised figures Commerce released Thursday, a 0.3 percentage-point downgrade from prior estimates.

So far this year, GDP has grown at an average annual rate of 1.5%, compared with 1.9% in the same period a year earlier.

Still, that may be enough to nudge Federal Reserve officials toward raising short-term interest rates from near-zero as soon as September. The Fed on Wednesday offered a more upbeat assessment of the economy following its two-day policy meeting, noting moderate household spending growth and additional improvement in the housing sector, even as business investment remained weak.

Thursday's report showed stronger consumption and solid residential investment helped drive GDP growth in the second quarter, along with an upturn in exports and a boost in state and local government spending.

The latest data "suggests that the economy is in far better shape than previously thought," said TD Securities economist Millan Mulraine. "In that regard, it should provide the Fed with further confidence in their relatively optimistic growth outlook."

Unlike last year, when much of the first-quarter weakness was blamed on unusually harsh winter weather, this year's slower growth reflected a range of factors, including a stronger dollar, sluggish business investment and lackluster consumer spending. Thursday's report showed some of those pressures may be starting to ease.

The rising dollar has pushed up the cost of American-made goods for customers overseas, while foreign products are cheaper in the U.S. In the second quarter, exports rose at a 5.3% rate, compared with a 6% drop in the first quarter. Imports, which subtract from GDP, rose 3.5%, versus a 7.1% increase in the first three months of the year.

Consumer spending, which accounts for more than two-thirds of economic output, rose 2.9% in the second quarter, compared with 2.1% in the first three months of the year. Overall consumer spending has been choppy, suggesting some Americans remain cautious about opening their wallets despite strong job gains this spring and accelerating wages.

But there are signs consumers may be starting to spend some of the windfall they received from months of lower gasoline prices. The saving rate fell in the second quarter, to 4.8% from 5.2%, while Americans spent more on long-lasting products, including cars.

Thursday's report also showed the housing market provided a boost to the economy in the second quarter, amid signs of strong activity during the spring selling season. Residential investment advanced at a 6.5% pace. However, that gain comes after two quarters of at least 10% growth.

"In sum, the mixing and matching of what drives GDP growth has shifted to consumption and housing," ITG chief economist Steve Blitz said in a note to clients.

Government spending also rose 0.8% in the second quarter, compared with a 0.1% decline in the first quarter, due entirely to an increase in state and local municipal spending.

Business spending, another key driver of the economy, remained soft in the second quarter and actually dragged down the overall GDP number for the first time since the third quarter of 2012. Nonresidential fixed investment--which reflects spending on software, research and development, equipment and structures--retreated at a 0.6% rate, compared with a 1.6% growth rate in the first quarter.

The numbers could be a sign businesses remain wary despite stronger consumer spending, steady job gains and an improving housing market.

The change in inventories had little effect on the overall figure, subtracting just 0.08 percentage point from the overall advance.

Excluding the effect of company restocking, underlying demand in the economy picked up in the second quarter. Real final sales of domestic product, a measure that excludes changes to inventories, increased at a 2.4% pace, compared with a 0.2% decline in the first quarter.

Many economists have said they expect growth to pick up in the second half of the year, but some forecasts are muted. Ahead of Thursday's GDP release, for example, Macroeconomic Advisers was predicting a 2.7% pace in the third quarter.

That would do little to help overall growth break out of its pattern of roughly 2% growth through much of the expansion. Fed staff forecast the economy to grow just 1.55% in 2015, according to projections prepared for the Fed's June policy meeting that were inadvertently posted to the central bank's website last week.

Fed officials upgraded their assessment of the economy Wednesday, pointing to solid job gains and diminished labor market slack.

There are signs in Thursday's report that inflation is also firming. The price index for personal consumption expenditures--the Fed's preferred measure for inflation--rose at a 2.2% pace in the second quarter. Core prices, which exclude food and energy costs, rose 1.8%.

Some economists said the latest GDP data won't have a major implications for the Fed's first rate increase.

"Upcoming readings on jobs will be more important factors, as the FOMC indicated that 'some' further improvement in the labor market is still needed before normalization will begin," Credit Suisse economist Dana Saporta said in a note to clients.

Corrections & Amplifications

The Federal Reserve upgraded its assessment of the economy on Wednesday. An earlier online version of this article erroneously said the upgrade came Thursday.

Write to Kate Davidson at kate.davidson@wsj.com