But as the economy finally gains steam after years of sluggish growth in the wake of the Great Recession, the Fed is facing a delicate political and economic balance. Unemployment is at an 18-year low. Inflation is running above the Fed’s 2 percent target. Gross domestic product growth could hit 3 percent this year, which would be the best rate in more than a decade, and growth for the second quarter is estimated to be as high as 5 percent when the numbers are released on Friday morning.

If the Fed raises rates too quickly, it risks slowing growth at a time when wages have stagnated for most American workers, after accounting for inflation. But if it raises rates too slowly, some Fed officials fear the economy could “overheat” and ignite a rapid spiral of price increases that could eventually prompt a recession. Historically, presidents have preferred lower rates, because faster economic growth typically helps incumbents win re-election.

Indeed, during his presidential campaign, Mr. Trump accused the Fed of getting political, saying that the bank’s chairwoman at the time, Janet L. Yellen, should be “ashamed” for keeping interest rates low — a move he said was meant to help President Barack Obama.

The Fed is on track to raise rates twice more this year, for a total of four increases in 2018, after cutting them to near zero in the wake of the financial crisis. The chairman of the Fed, Jerome H. Powell, has continued to express confidence that the United States economy is strong enough to handle higher borrowing rates. Typically, a period of economic expansion is the exact moment when a central bank seeks to raise rates, to keep price growth in check — and in part to maintain firepower to lower borrowing costs during the next economic downturn.

Larry Kudlow, who leads the National Economic Council, said on Thursday that Mr. Trump’s comments were not unusual in historical context.