U.S. crude oil futures settled up 46 cents, or 1.12 percent, at $41.60 a barrel. Oil held earlier gains after the weekly rig count showed a fifth-straight weekly increase. Earlier, WTI briefly dipped below its 200-day moving average of $40.70 that traders identify as a support area.
The energy sector closed 0.7 percent higher after earlier falling 1.5 percent.
Chevron also reversed losses to close nearly 0.7 percent higher. The firm reported a second-quarter loss of 78 cents a share as it reported $2.8 billion in impairments. The same period last year, the firm reported profit of 30 cents a share. Ex-items, adjusted earnings per share topped expectations by 3 cents at 35 cents a share.
Exxon Mobil closed nearly 1.4 percent lower after posting earnings that badly missed expectations.
The advance read on second-quarter GDP showed a 1.2 percent annualized growth rate, well below expectations for 2.6 percent.
"While the potential for a Federal Reserve increase in September was not particularly high, it's lower now," said Thomas Wilson, managing director of wealth advisory at Brinker Capital.
First-quarter GDP was revised lower to 0.8 percent from 1.1 percent. On Thursday, the Atlanta Federal Reserve sent a shudder through markets when it came out with a new 1.8 percent forecast for the second quarter, off from 2.3 percent the day before.
Consumer spending, which accounted for most of the GDP rebound in the second quarter, increased at a 4.2 percent rate, the fastest since the fourth quarter of 2014, Reuters said. Consumer spending accounts for more than two-thirds of U.S. economic activity.
"The GDP report, it's disappointing with all the revisions. ... On balance, it paints a picture of an economy that is still struggling," said John Canally, chief economic strategist at LPL Financial.
Dallas Federal Reserve Bank President Robert Kaplan told reporters in a Reuters article that "you can't overreact to any one data point ... this number will get revised.
Earlier, San Francisco Fed President John Williams said the central bank is likely to raise rates in the future, not cut them, Dow Jones reported. He also said in the report the Fed needs to take account of its impact overseas and that slow and gradual rate rises are helpful for the international economy.
In other economic news, the employment cost index rose 0.6 percent, on a seasonally adjusted basis, for the three-month period ending June 2016.
Chicago PMI came in at 55.8 in July versus 56.8 in June. Consumer sentiment was 90.0 in July.
Treasury yields were lower, with the 2-year yield around 0.66 percent and the 10-year yield near 1.46 percent.
"We have the technical factors related to month-end buying and weaker GDP data," said Robert Tipp, chief investment strategist and head of global bonds for Prudential Fixed Income.
Gold futures for December delivery settled up $16.30 at $1,357.50 an ounce.
The U.S. dollar index was more than 1 percent lower, with the euro around $1.118 and the yen near 102.1 yen, stronger against the dollar after the Bank of Japan disappointed market expectations for stimulus.
"The Bank of Japan has a history of very strong surprises," said Joe Higgins, managing director, fixed income strategies at TIAA Global Asset Management. He noted that this time, there seemed to be little effort "to match some firepower with the announced fiscal stimulus from the Abe administration. Clearly it'd seem that we are at some point of inflection."
The Nikkei 225 closed about half a percent higher, while the Hang Seng ended more than 1 percent lower and the Shanghai composite was off half a percent.
European stocks were mostly higher, with the STOXX Europe 600 Banks more than 2 percent higher after some major bank earnings and ahead of stress test results, due later in the day.
Other earnings reports included United Parcel Service, which posted earnings in-line with expectations, on revenue that beat. Xerox posted earnings that topped estimates, on revenue in-line with forecasts.