Stocks started the session higher, lost ground in the middle of the day, then rallied late.
Investors took a cue from Japan, where the Nikkei 225 index rose on a Bank of Japan policy shift.
The Bank of Japan initiated what it called a "Quantitative and Qualitative Monetary Easing," which included doubling its holdings of Japanese bonds within two years.
The BOJ said it would discontinue its current asset purchasing and incorporate that program into the new one, The Wall Street Journal reported.
In Tokyo, the Nikkei 225 index closed at 12,634.54, adding 272.34 points, or 2.2 percent.
But domestic data was discouraging.
The Labor Department said there were 28,000 additional first-time jobless benefits claims filed in the current week, bringing the weekly tally to 385,000.
The Dow Jones industrial average closed with a gain of 55.76 points, 0.38 percent, to 14,606.11. The Standard & Poor's 500 index added 6.29 points of 0.4 percent, to 1,559.98. The Nasdaq composite index of tech-dominated stocks climbed 0.2 percent on a gain of 6.38 points to 3,224.98.
On the New York Stock Exchange, 1,872 stocks advanced and 1,135 declined on a volume of 3.3 billion shares traded.
The 10-year U.S. treasury note rose 14/32 to yield 1.766 percent.
Against the dollar, the euro was $1.2932 from Wednesday's $1.2849. Against the yen, the dollar rose to 96.34 yen from Wednesday's 93.05 yen.
In London, the FTSE 100 index dropped 1.19 percent, losing 76.16 points to 6,344.12.