By James Ramage

The dollar advanced against the euro on Friday, capping its biggest weekly gain in more than three years, after the U.S. reported inflation growing faster than expected and the Federal Reserve reiterated it was on track to raise short-term interest rates this year.

Upbeat inflation figures for April come on the heels of indicators this week that pointed to a continued recovery in the labor and housing markets. That heartened dollar bulls who've recently been rattled by a first-quarter slump in the U.S. economy. While the headline consumer-price index was in line with expectations, so-called core inflation, which strips out the effects of volatile food and energy prices, rose by 0.3%, the biggest gain since January 2013.

Federal Reserve officials watch inflation numbers closely in trying to gauge the health of the U.S. economy and determine when they would raise interest rates for the first time since 2006.

"The core inflation number was encouraging. It was good for the dollar," said Jim Caron, portfolio manager on the global fixed-income team at Morgan Stanley Investment Management, which oversees $406 billion. "This feels like we're taking a small step forward in what needs to be many, many steps forward."

Later in the trading session, Fed Chairwoman Janet Yellen said, in remarks to the Greater Providence Chamber of Commerce in Providence, R.I., that it would be "appropriate at some point this year to take the initial step to raise the federal-funds rate target and begin the process of normalizing monetary policy."

Ms. Yellen's comments "support the dollar's large gains today," said Robert Lynch, head of developed-market currencies strategy for the Americas at HSBC Bank USA. "Hearing the Fed chair reiterate that rates are still expected to go up this year may resonate in the market."

The dollar has staged a sharp seven-month rally that gained traction last summer on expectations that the Fed would raise rates while other major central banks would continue to pursue loose monetary policies. Relatively high rates make a currency more attractive to investors.

But that rally began to sputter in mid-March amid a flurry of soft economic data, including first-quarter growth that clocked in at an anemic 0.2% rate. At the same time, the eurozone began to show signs of stronger growth.

That prolonged halt spooked investors, convincing many in the market that the greenback's ascent would be more measured when it resumed.

The Wall Street Journal Dollar Index, which tracks the greenback's value against a basket of 16 currencies, rose 0.7% on Friday and 2.6% this week.

The dollar on Friday gained 1% against the euro, with one euro buying $1.1006; it was at $1.1113 in late New York trading on Thursday. For the week, the buck notched a 4% gain against the common currency, the biggest one-week rise since September 2011.

To be sure, many investors remain reluctant in putting fresh bets on the dollar. Net bets that the dollar would appreciate against the euro declined 5.9% in the week ended May 19, according to the U.S. Commodity Futures Trading Commission.

The dollar rose 0.4% to JPY121.55 against the yen and was on track to hit its highest New York close in more than seven years.

Fed-funds futures, which traders and investors use to wager on Fed policies, showed that investors see a 61% chance for a rate increase in December, compared with 55% before the inflation numbers were released, according to CME Group. Investors also see a 46% chance of a rate increase in October, compared with a 38% probability before the data. Market participants see a 27% probability of higher rates in September.

Friday's inflation data "makes a September rate hike more probable," said Vassili Serebriakov, currency strategist at BNP Paribas. "It strikes against the complacency that the Fed won't be able to move at all this year."