The Dow Jones industrial average was up 106 points, or 0.8%. The index briefly rose above 13,000, a psychologically important level it has not crossed since early May.
The S&P 500 added 15 points, or 1.1%, and the Nasdaq gained 37 points, or 1.3%.
The U.S. economy grew at a 1.5% annual rate in the second quarter of 2012, according to the government. That's down from a 2% rate in the first three months of the year, but it's slightly better than the predicted 1.4% annual pace.
While the report was slightly better than expected, the outlook for growth remains lackluster as the weak job market curtails consumer spending. Many traders expect the Federal Reserve, which meets next week, to take additional steps to stimulate growth.
"We've learned that you never fight the Fed when they want to get something done and have the ammunition to do it," said Anthony Conroy, head trader at BNY ConvergEx Group. "I'm not sure we'll close on the highs, but we've had a decent morning."
Stocks were also supported by hopes for a stronger response to the debt crisis in Europe.
European Central Bank president Mario Draghi said Thursday that the bank will do "whatever it takes" to preserve the euro. French President Franois Hollande and German Chancellor Angela Merkel said in a joint statement Friday that they are "committed to do everything to protect the eurozone."
A report in French newspaper Le Monde said the ECB, which also meets next week, is working with government leaders on a plan to buy Spanish and Italian bonds, under certain conditions. Borrowing costs for both countries rose to record highs earlier this week before falling back on the latest political rhetoric.
Investors also focused on quarterly earnings and sales reports from a host of leading corporations, including a disappointing performance by Facebook.
World markets: European markets closed higher. Britain's FTSE 100 rose nearly 1%, the DAX in Germany gained 1.6%, while France's CAC 40 surged 2.2%.
Asian markets ended higher. The Shanghai Composite ticked up 0.1%, the Hang Seng in Hong Kong gained 2% and Japan's Nikkei added 1.5%.
Economy: The Thomson Reuters/University of Michigan's final reading on the overall index on consumer sentiment fell to 72.3 in July from 73.2 in June. It was the lowest level since December.
Economists had expected the index to remain unchanged in July at 72, according to a survey of analysts by Briefing.com.
Companies: Facebook (FB) shares fell to an all-time low, after the social network company's first quarterly earnings release as a public company. Facebook beat analysts' revenue expectations slightly and earnings matched forecasts, but that was apparently not enough for Wall Street.
Starbucks (SBUX, Fortune 500) shares also tumbled after quarterly earnings that missed analysts' expectations.
Expedia (EXPE) shares surged after the online travel booking company reported strong quarterly results.
Despite reporting mixed quarterly results and a disappointing outlook, Amazon (AMZN, Fortune 500) shares moved higher as investors focused on the online retailer's long-term growth prospects.
Shares of Barclays (BCS) gained after the bank apologized for the Libor scandal while reporting a $6.3 billion profit for the second quarter.
Merck (MRK, Fortune 500) shares rose after the pharmaceutical company beat earnings and sales expectations and affirmed its outlook for the year.
Chevron (CVX, Fortune 500) reported a profit that slipped from a year ago due to weaker oil prices, but the company's earnings per share still topped expectations. Revenue, however, fell short of estimates.
Del Frisco's (DFRG), a high-end steakhouse chain, raised $75 million in its initial public offering late Thursday, as shares priced at $13, below the range of $14 to $16. Del Frisco's will list on the Nasdaq and begin trading under the ticker "DFRG" Friday.
Currencies and commodities: The dollar fell against the euro, the British pound and the Japanese yen.
Oil for September delivery rose 56 cents to $89.95 a barrel.
Gold futures for August delivery rose $2.20 to $1,617.30 an ounce.
Bonds: The price on the benchmark 10-year U.S. Treasury fell, pushing the yield up to 1.51% from 1.43% late Thursday.