“I have the absolute right to declare a national emergency,” he told reporters as he headed to an event at the border.
He also said Mexico would “indirectly” pay for the wall – contradicting an earlier campaign memo.
The government has been in partial shutdown for 20 days, leaving about 800,000 federal employees without pay.
President Trump refuses to sign legislation to fund and reopen the government if it does not include $5.7bn (£4.5bn) for a physical barrier along the US-Mexico border.
But budget talks have come to a standstill as Democrats – who control the House of Representatives – refuse to give him the money.
Republican leaders insist the party stands behind the president, although some Republican lawmakers have spoken out in favour of ending the shutdown.
How could Trump pay for the wall without Congress?
On Thursday, Mr Trump visited a border patrol station in McAllen, in the Rio Grande Valley of Texas.
He said that if Congress did not approve funding for the wall, he would “probably… I would almost say definitely” declare a national emergency to bypass lawmakers.
Analysts say that while presidents can direct military construction projects during war or national emergencies, the move would almost certainly face a legal challenge, and be accused of violating constitutional procedures.
The money would also have to come from funds allocated by Congress for other purposes – which some Republicans would also oppose.
One of his supporters though, Republican Senator Lindsey Graham, said it was “time for President Trump to use emergency powers to fund the construction of a border wall/barrier”.
Democratic Senator Joe Manchin said that while a national emergency declaration by Mr Trump would be “wrong”, it may be the president’s “only way out” of the deadlock.
Analysts say such a move would provide political cover to reopen government while allowing Mr Trump to argue he had done all he could to fulfil one of his main campaign promises.
Mr Trump has been briefed on one plan that would involve diverting funding allocated to reconstruction projects in disaster areas, including Puerto Rico, to pay for the wall, US media report.
How did Trump make his case for the wall ?
Mr Trump spoke at McAllen station, behind a display of weapons and cash said to have been seized by the border patrol.
He was joined by border patrol agents, and relatives of people killed by illegal immigrants.
“If we don’t have a barrier… you’re not going to be able to solve this problem,” he said, adding that people faced “hard work”, “gruelling problems” and “a lot of death” without it.
Mr Trump added: “They say a wall is medieval… There are some things that work.”
Has Trump changed his pledge on funding the wall?
Mr Trump made the border wall a key campaign promise – and pledged to make Mexico pay for it.
However, speaking on Thursday, Mr Trump claimed he never meant that Mexico would make a one-time payment.
“When I said Mexico would pay for the wall in front of thousands and thousands of people… obviously I never meant Mexico would write a cheque,” he said.
However, this is contradicted by an archived campaign memo from 2016, where Mr Trump outlined how he planned to “compel Mexico to make a one-time payment” of $5-10bn (£4bn-£8bn) for the wall.
Mr Trump said on Thursday that, instead of a direct payment, Mexico would be “paying for the wall indirectly, many, many times over”, under a new trade deal between the US, Mexico and Canada.
Economists have disputed this and critics say that any savings incurred due to the deal would go directly to private businesses rather than flow into US Treasury.
How is the shutdown progressing ?
Partial shutdowns occur when Congress cannot agree a budget by a certain deadline or the president refuses to sign it.
This shutdown, which began on 22 December, has closed 25% of the government. Of the 800,000 federal employees affected, about 350,000 are furloughed – a kind of temporary lay off – and the rest are working without pay.
Shutdown negotiations failed on Wednesday when Mr Trump walked out of a meeting with Democratic leaders.
The president called the meeting “a total waste of time” after top Democrats Nancy Pelosi and Chuck Schumer refused to budge on agreeing to legislation that includes funding for a wall.
The first pay day since the shutdown falls on Friday and will pass without workers getting salaries.
Hundreds of federal workers, contractors and supporters rallied outside the White House on Thursday in protest against the shutdown.
This weekend the shutdown will become the longest in US history.