NEW YORK, June 12 (Reuters) - U.S. stocks rallied and the dollar sank as cooler-than-expected inflation data fueled rate cut optimism, hours before the end of the U.S. Federal Reserve's monetary policy meeting.

Benchmark U.S. Treasury yields were sharply lower after the Labor Department's closely watched CPI report showed core prices growing at their slowest annual pace in over three years.

"I'm very impressed with the core year-over-year coming in at 3.4%," said Peter Cardillo, chief market economist at Spartan Capital Securities in New York. "It is playing into the hands of the Fed in the sense they’re data dependent."

Cardillo expressed doubt that the report will alter the Fed's rate decision expected later in the session, but added that "it's obviously a comforting number."

All three major U.S. stock indexes were sharply higher, with the tech-laden Nasdaq leading.

The cooler-than-expected inflation print comes as welcome news as members of the Federal Open Markets Committee (FOMC) approach the end of their June meeting.

While they are widely expected to leave the key Fed funds target rate unchanged at 5.25%-5.50%, the central bank is also expected to release its Summary of Economic Projections which should show, among other things, the number of rate cuts it expects this year, otherwise known as the dot plot.

"If the dot plot should indicate two rate cuts this year, most likely in the latter part of the year, that would be very welcome news for the market," Cardillo said.

At last glance, financial markets are pricing in a 62.0% likelihood of a 25 basis point rate cut in September, up from 46.8% on Tuesday, according to CME's FedWatch tool.

The Dow Jones Industrial Average rose 195.92 points, or 0.51%, to 38,943.34, the S&P 500 gained 66.92 points, or 1.24%, to 5,442.24 and the Nasdaq Composite added 315.86 points, or 1.82%, to 17,659.40.

European shares, already in positive territory in advance of the data, surged after the CPI report.

The pan-European STOXX 600 index rose 1.20% and MSCI's gauge of stocks across the globe gained 1.28%.

Emerging market stocks rose 0.49%. MSCI's broadest index of Asia-Pacific shares outside Japan closed 0.66% higher, while Japan's Nikkei lost 0.66%.

The dollar tumbled against a basket of world currencies on mounting bets the Fed could issue its first interest rate cut as early as September.

The dollar index fell 0.73%, with the euro up 0.93% to $1.0839.

The Japanese yen strengthened 0.77% versus the greenback at 155.90 per dollar, while Sterling was last trading at $1.2849, up 0.86% on the day.

U.S. benchmark 10-year Treasury notes last rose 33/32 in price to yield 4.2752%, from 4.402% late on Tuesday.

The 30-year bond last rose 46/32 in price to yield 4.4491%, from 4.535% late on Tuesday.

Oil prices advanced, supported by forecasts that global inventories will fall in the latter half of the year.

U.S. crude rose 1.59% to $79.14 per barrel and Brent was last at $83.21, up 1.57% on the day.

Gold gained ground in advance of the Fed's policy statement and updated economic projections.

Spot gold added 0.5% to $2,328.49 an ounce.

(Reporting by Stephen Culp; Additional reporting by Amanda Cooper in London; Editing by Alexander Smith)