Apple's shares rose 2.2 percent to $112.57, rebounding from losses the day before when the iPhone and iPad maker unveiled new offerings.

Biotech also boosted the market, with Gilead up 3.3 percent at $107.25, giving the second-biggest boost to the S&P 500 and Nasdaq after Apple. The Nasdaq biotechnology index <.NBI> was up 1.9 percent.

The day's gains follow a 1-percent market decline on Wednesday and weeks of volatility largely tied to worries about a slowdown in Chinese growth and its impact on the global economy. Investors also have been nervous about next week's Fed meeting and whether the central bank will decide to raise interest rates for the first time in nearly a decade.

"It's this tug of war, and that gives big moves going both ways at the moment. Obviously investors are very unsettled with regard to their conviction," said Mark Luschini, chief investment strategist at Janney Montgomery Scott in Philadelphia.

"It certainly doesn't seem as though we have a groundswell of demand coming into stocks that can push the market up significantly."

The Dow Jones industrial average <.DJI> rose 76.83 points, or 0.47 percent, to 16,330.4, the S&P 500 <.SPX> gained 10.25 points, or 0.53 percent, to 1,952.29 and the Nasdaq Composite <.IXIC> added 39.72 points, or 0.84 percent, to 4,796.25.

Nine of the 10 major S&P sectors were higher, led by the healthcare <.SPXHC>, up 0.9 percent, and technology <.SPLRCT>, up 1 percent.

Adding to uncertainty surrounding the Fed's next meeting, data showed the U.S. labor market appeared to gain momentum in early September as fewer Americans filed for weekly unemployment benefits, while another report showed import prices fell last month.

Influential fund manager David Tepper of Appaloosa Management told CNBC that corporate earnings may not rise as much as expected and he was not overly bullish on stocks next year.

Krispy Kreme Doughnuts fell 11.7 percent to $15.65, a day after the doughnut chain cut its 2016 profit forecast.

Also, shares of Avon Products fell 9.5 percent to $4.10, reversing earlier gains. The Wall Street Journal reported the company was in talks with private equity firms about an investment through a stake sale in the struggling company.

Lululemon Athletica was down 16.4 percent at $53.54. The yogawear retailer's gross margins continue to be under pressure as it spends more on product development and sourcing.

NYSE advancing issues outnumbered declining ones 1,623 to 1,398, for a 1.16-to-1 ratio; on the Nasdaq, 1,656 issues rose and 1,155 fell for a 1.43-to-1 ratio favoring advancers.

The benchmark S&P 500 index posted 1 new 52-week high and 8 lows; the Nasdaq recorded 28 new highs and 62 lows.

About 6.8 billion shares changed hands on U.S. exchanges, above the 8.1 billion daily average for the past 20 trading days, according to Thomson Reuters data.

(Additional reporting by Tanya Agrawal; Editing by Don Sebastian Editing by Nick Zieminski)

By Caroline Valetkevitch