Democrats "want a shutdown to get off the tax cuts because they have worked so well," Trump said while touring a factory in Southeastern Pennsylvania.

Lawmakers on Capitol Hill have until midnight on Friday to avert a government shutdown by passing a short-term funding measure.

"Nobody thought, including the Democrats, they could work this well," Trump said of the tax plan. "They have been so good that I think the Democrats would like to see a shutdown in order to get off that subject. That is not a good subject for them, the tax cuts, because of the way they have worked."

Even as the federal government careened towards a shutdown, Trump looked to tout his first year in office, particularly the impact his presidency has had on the economy.

Read More

"It's the economy, stupid? You ever hear that one? It is, indeed," Trump said during his speech in Pennsylvania, parroting a line attributed to Bill Clinton's 1992 presidential campaign.

Trump heralded the GOP tax cut, telling the factory workers it was about "keeping more of your hard-earned money."

The speech was a preview of Republican's key priority in 2018: Keeping control of the House and Senate. Republicans in swing districts are expected to lean heavily on positive economic news and the Republican-passed tax plan to woo voters who have grown skeptical of the President.

Trump said Thursday that not even he -- someone known for overestimating something's impact -- could have foreseen that his tax plan would have the affect it has had. To prove his point, Trump noted how Apple announced on Wednesday that it would pay $38 billion in taxes on cash it has been keeping overseas and pledged to create 20,000 jobs and invest $30 billion in US facilities over the next five years.

Trump told the audience that he called Tim Cook, the tech giant's CEO, to thank him.

"People are really doing well, and they are doing better than they have in years," Trump told reporters before the speech "And to be honest, the tax cuts, not only have they worked, they are working much bigger and much faster than we ever thought possible."