WASHINGTON—The Federal Reserve showed continued optimism about the U.S. economy in voting Wednesday to raise short-term interest rates for the third time this year, and signaling it would stay on a similar path next year amid a leadership transition.

Officials nudged their economic-growth estimates higher for the next few years on expectations that congressional Republicans will pass tax cuts. But the Fed policy makers’ new projections suggest the boost wouldn’t be so large that they would have to speed up the pace of rate increases to guard against too much inflation.

“At the moment the U.S. economy is performing well,” Fed Chairwoman Janet Yellen said at a press conference after the central bank’s two-day policy meeting ended Wednesday.

“The growth that we’re seeing, it’s not based on, for example, an unsustainable buildup of debt,” she added. “The global economy is doing well. We’re in a synchronized expansion. This is the first time in many years we’ve seen this.”

The Fed said it would increase its benchmark federal-funds rate Thursday by a quarter percentage point to a range between 1.25% and 1.5%, the fifth such increase in the past two years. Officials penciled in three quarter-point rate increases for next year, as they had in September, and two such increases each in 2019 and 2020.

The big question heading into their two-day meeting was how much Fed officials expected to lift rates in coming years. The prospect of new fiscal stimulus in the form of tax cuts, combined with solid hiring and lofty asset values, could argue for picking up the pace to prevent the economy from overheating. But low inflation and modest wage growth could support the case for sticking with a gradual approach.

Chicago Fed President Charles Evans joined Minneapolis Fed President Neel Kashkari on Wednesday in casting two dissenting votes, against seven in favor or raising rates. Both have cited weak inflation as a reason to hold off.

Fed officials projected the economy would grow 2.5% next year, up from the 2.1% they predicted in September. They also expect the unemployment rate will fall to 3.9% by the end of next year, down from their earlier forecast of 4.1%.

Officials didn’t project more interest-rate increases or higher inflation because price pressures have been surprisingly muted this year. They still project inflation to rise to their 2% target by 2019, the same as they expected in September.

“It could take a longer period of a very strong labor market in order to achieve the inflation objective,” Ms. Yellen said Wednesday.

Economists said the latest projections and Ms. Yellen’s comments Wednesday show officials believe growth won’t generate as much inflation as previously thought. “If inflation does actually pick up, it implies that they move more rapidly” to raise rates, said Lewis Alexander, chief U.S. economist at Nomura Securities.

Chicago Fed President Charles Evans, above, and Minneapolis Fed President Neel Kashkari, below, dissented to the Fed’s decision to raise short-term interest rates. Photo: arnd wiegmann/Reuters

Photo: Mark Kauzlarich/Bloomberg News

Fed officials slashed their benchmark federal-funds rate to near zero during the financial crisis and held it there for seven years before raising it by a quarter percentage point in December 2015, the start of a gradual series of small increases. In October, the Fed also started shrinking its $4.5 trillion portfolio of bonds and other assets, most of which were purchased as part of extraordinary postcrisis measures to support the economy.

Since officials last met in early November, Congress has moved rapidly on legislation that would cut business and individual taxes by around $1.4 trillion over the next decade. Before this week, many Fed officials refrained from building into their forecasts much prospect of fiscal stimulus because it wasn’t clear what Congress would pass.

House and Senate Republicans are reconciling different versions of tax bills that have passed their respective chambers with the goal of putting a unified plan before President Donald Trump to sign by Christmas. The White House has said the plan can boost growth to levels that make up for revenue shortfalls.

An analysis from the nonpartisan Joint Committee on Taxation found the tax bill wouldn't pay for itself with more economic growth and instead would result in about $1 trillion in additional budget deficits over a decade.

Fed officials’ projections show they don’t see the tax cut raising the economy’s long-run growth rate, which they left unchanged at 1.8%.

“It’s fair to say that the Fed doesn’t see the tax package as a game changer in terms of growth—just some modest upside, concentrated mostly in 2018,” said Roberto Perli, an analyst at research firm Cornerstone Macro LP.

While officials have now largely incorporated the effects of tax changes into their growth forecasts, Ms. Yellen said, “importantly, you really don’t at the end of the day see very much change in the federal-funds rate path.”

Ms. Yellen added that she remained concerned higher budget deficits could leave fiscal policy makers with less scope to respond aggressively to an economic downturn in the future. Budget deficits are projected to grow as the baby boom ages, even before the added effect of tax cuts. “Taking what is already a significant problem and making it worse, it is a concern to me,” she said.

While Ms. Yellen will preside over one more Fed meeting early next year, Wednesday featured her last scheduled press conference before her term ends Feb. 3. While she is likely to hand her successor an economy in far better shape than when she took over four years ago, the Fed faces several balancing acts.

On one hand, inflation has run below its annual 2% target most of this year, reaching just 1.6% in October by the central bank’s preferred gauge. On the other hand, with the economy so strong and more stimulus on the way, they don’t want to hold rates too low for too long and cause price pressures to surge out of control or fuel asset bubbles and other financial imbalances.

Now that the Fed has successfully moved interest rates away from zero and initiated the steady wind down of the portfolio, “the battle is over the terminal fed-funds rate, and how quickly you get to it,” said Vincent Reinhart, chief economist of Standish Mellon and former director of the Fed’s monetary policy division. Fed officials’ new projections show they see that longer-run level at around 2.75%, implying the Fed is already about half way there.

Mr. Trump’s nominee to succeed Ms. Yellen as central bank chief, Fed governor Jerome Powell, has indicated he could offer a lighter touch on financial regulation but has shown few signs of diverging from Ms. Yellen on monetary policy.

Ms. Yellen has said she would resign her seat on the Fed’s seven-member board once Mr. Powell is confirmed and sworn in, making her the third governor to leave within a year and giving Mr. Trump another opportunity to reshape the Fed.

Fed officials also are wrestling with the fact that the economy isn’t responding to its rate moves as it did in the past, making it harder to discern the right policy path.

Fed increases in short-term rates used to tighten credit more broadly, causing bond yields to rise and boosting other borrowing costs, such as for mortgages, credit cards and business loans. This year, instead, financial conditions have eased, with stock prices rising to new highs and long-term bond yields remaining low, due in part to easy-money policies from central banks in Europe and Japan.

Banks have held rates on savings deposits at historically low levels. The average interest rate paid by the biggest U.S. banks on interest-bearing deposits rose to 0.40% in the third quarter, up from 0.34% in the second quarter, according to Autonomous Research.

Low interest rates have been a pleasant surprise for Joe Williams, 33, who is looking to trade up to a larger home to make room for a growing family. Mr. Williams, who works in retail operations, and his wife are preapproved for a 30-year mortgage that carries a 3.75% interest rate for the first seven years. That is higher than the 3.125% rate he locked in on his Minneapolis home two years ago.

If rates looked likely to rise faster, “that would motivate us to get a little bit more aggressive” in buying the move-up home, he said.

Write to Nick Timiraos at nick.timiraos@wsj.com