A stronger-than-expected report on the labor market also helped lift stocks, but some weak tech sector earnings weighed on the Nasdaq.

The beaten-down energy sector rallied on hopes that a Republican majority could pass legislation that includes approval of oil and gas pipelines and reforms of crude and natural gas export laws. The S&P energy index <.SPNY> was up 1.8 percent.

"For now, the market generally likes the results. If we had uncertainty around the result, that would have been a cause for concern," said John Canally, chief economic strategist at LPL Financial.

"A little bit less business unfriendliness coming out of Washington is a clear plus," he added, noting that 88 percent of the time, stocks rise in the fourth quarter of midterm election years, regardless of the outcome.

U.S. private employers added 230,000 jobs in October, the most since June, according to the ADP National Employment report. The data could raise hopes for Friday's closely-watched payroll report. On the downside, the pace of growth in the U.S. services sector slowed more than expected in October.

Time Warner Inc (>> Time Warner Inc) rose 4 percent to $77.99 after it reported revenue growth of 3 percent. Activision Blizzard Inc (>> Activision Blizzard, Inc.) late Tuesday raised its full-year forecast, sending shares up 4.4 percent to $20.83.

The Dow Jones industrial average <.DJI> rose 100.69 points, or 0.58 percent, to 17,484.53, the S&P 500 <.SPX> gained 11.47 points, or 0.57 percent, to 2,023.57 and the Nasdaq Composite <.IXIC> dipped 2.92 points, or 0.06 percent, to 4,620.72.

Weighing on the Nasdaq, TripAdvisor Inc (>> Tripadvisor Inc) dropped 14.1 percent to $71.95, a day after weaker-than-expected earnings. FireEye Inc (>> FireEye Inc) fell 15 percent to $29.12 a day after the cybersecurity company's revenue outlook was largely below expectations.

After the market closed, Tesla Motors shares (>> Tesla Motors Inc) gained 5.2 percent following results.

About 6.4 billion shares changed hands on U.S. exchanges, below the 7.3 billion average for the last five sessions.

NYSE advancing issues outnumbered decliners 1,799 to 1,258, for a 1.43-to-1 ratio on the upside; on the Nasdaq, 1,408 issues rose and 1,278 fell for a 1.10-to-1 ratio.

The S&P 500 posted 92 new 52-week highs and 5 new lows; the Nasdaq Composite showed 113 new highs and 55 new lows.

(Editing by Nick Zieminski)

By Yasmeen Abutaleb