Mario Draghi, the ECB's president, said the bank was willing to take more steps to support the region's economy if needed, including buying bonds.
"It's a big step by Draghi," said Jason Pride, director of investment strategy at Glenmede Trust. "I would say it's a big thing even though the markets may have expected it."
The Standard & Poor's 500 index rose 12.58 points, or 0.7 percent, to close at 1,940.46.
The Dow Jones industrial average rose 98.58 points, or 0.6 percent, to 16,836.11. The Nasdaq composite gained 44.58 points, or 1.1 percent, to 4,296.23. Both the S&P 500 and the Dow average are at record-high levels.
Germany's main stock index, the DAX, touched a record high before pulling back and ending the day with a gain of 0.2 percent. France's CAC 40 surged 1.1 percent.
"The world looks to be a safer place today," said Chris Rupkey, chief financial economist at the Bank of Tokyo-Mitsubishi in New York, in a note to clients. "If you lend money out, the ECB has money for you."
The U.S. and Europe are tightly connected through financial markets, the banking system and trade. Added together, the countries in the European Union make up the world's second-largest economy and buy roughly a fifth of all U.S. exports. Coca-Cola and other large corporations have blamed Europe's weak economy for hurting sales.
The ECB's move to support the region's economy came as welcome news, said Hank Smith, chief investment officer at Haverford Trust. But it wasn't a big surprise. In recent weeks, research teams at big banks and strategists on Wall Street have issued scores of reports predicting just such a move.
"It was on everyone's radar screen," Smith said.
Before the market opened, the Labor Department said the number of Americans applying for unemployment benefits crept up last week to 312,000. The news heightened speculation that the government's monthly jobs report, due out Friday, could reveal a modest slowdown in hiring in May. It also followed a report from payroll processer ADP on Wednesday that showed private employers pulling back on hiring last month.
Economists estimate that U.S. employers added 220,000 jobs in May and that the unemployment rate inched up to 6.4 percent from 6.3 percent as more people hunt for work.
Among other companies making moves, PVH, the company behind the Calvin Klein and Tommy Hilfiger brands, cut its profit forecast late Wednesday, blaming the global economy and a rough winter in the U.S. for weaker sales. The retailer put more clothes on sale, which pinched profit margins. PVH's stock sank $10.59, or 8 percent, to $120.09.
Joy Global, a maker of mining equipment, reported a big drop in quarterly profits and sales as coal miners scaled back operations. Joy Global's results were still better than analysts had expected. The company's stock gained $3.85, or 7 percent, to $61.70.
In the market for U.S. government bonds, the yield on the 10-year Treasury fell to 2.58 percent from 2.60 percent late Wednesday. The price of oil slipped 16 cents to $102.48 a barrel.