"If we have to close down our government, we're building that wall," Trump said at a rally in Arizona.
That sent the safe-haven yen higher, with the dollar fetching as little as 109.31 yen, compared with as high as 109.82 yen prior to Trump's remarks. The dollar/yen was at 109.33 at 4:15 p.m. HK/SIN.
Spot gold also bumped higher, rising as high as $1,2887.30 an ounce after the remarks from as low as $1,282.94 earlier. It was at $1,286.71 at 4:16 p.m. HK/SIN.
The , which measures the greenback against a basket of currencies, lost ground, falling as low as 93.357 from as high as 93.619 earlier. It was at 93.427 at 4:16 p.m. HK/SIN.
The moves were relatively modest, with one analyst pointing toward some market hesitancy to accept Trump's statements at face value.
"It's clearly concerning if he wants to tie the wall to the government shutdown. That's certainly an issue and that's an issue for the dollar," Chris Watling, CEO of Longview Economics, told CNBC's "Capital Connection" on Wednesday.
But he added, "We've heard a lot of comments out of Trump that sort of go away very quickly, about as quickly as they come. We'll have to see how other people in the administration react. I suspect he's just playing to the crowd."
Watling noted that Trump's support base has been waning.
"I think he's becoming slightly wilder in his commentary as a result," he said.
The market has had some concerns about whether Congress will meet tight budget deadlines.
If Congress does not reach a funding deal that the president signs into law by a September 30 deadline, the government will shut down.
Congressional Democrats have explicitly said they will not support a deal that includes money for the wall. Estimates have put the cost of a wall along the 2,000-mile border at anywhere from $10 billion to nearly $40 billion.
The majority Republicans will need the minority party's votes to keep the government open.
Trump could veto or choose not to sign a spending measure that Congress passes without funding for the barrier, causing a shutdown.
Treasury Secretary Steven Mnuchin has warned that if no action is taken, the U.S. could be in default by October.
As a candidate, the president pledged to build a physical barrier along the entire U.S.-Mexico border as part of his push to crack down on illegal immigration. He pledged that Mexico would fund the project, but America's southern neighbor quickly quashed that idea.
also took a hit amid Trump's rally, where the president's remarks included him saying he doubted the North American Free Trade Agreement could be renegotiated.
"I think we'll end up probably terminating NAFTA at some point," he said at the rally of the efforts to tweak the three-nation deal with Mexico and Canada.
The peso slipped, with the dollar fetching as much as 17.773 pesos after the remarks, compared with as little as 17.646 earlier. The dollar was fetching 17.762 pesos at 4:14 p.m. HK/SIN.
—CNBC's Jacob Pramuk and Patti Domm contributed to this article.