The trip to the "Golden State" -- the most populous in the country and a Democratic stronghold -- was largely upstaged by his own announcement that he had sacked Secretary of State Rex Tillerson.
On the other side of the border, a small group of anti-Trump protesters vented their frustration, and announced plans to boycott US businesses over the frontier.
"For the people who say 'no wall' -- if you didn't have walls over here, you wouldn't even have a country," Trump said near the border in San Diego.
Trump repeated his insistence that law enforcement personnel should be able to see through the structure so that they could monitor criminal cartels that might be "two foot away" on the Mexican side.
"Without a wall there would be bedlam, I imagine," he added.
Trump inspected eight 30-foot high (nine-meter) models made of concrete and steel, erected side-by-side at Otay Mesa, an area in southern San Diego along the border with Tijuana, Mexico.
Each prototype cost more than $300,000 and, according to some estimates, the complete wall could carry a $20 billion price tag.
Congress has yet to approve the funding amid skepticism and Democratic opposition, but an administration official said the wall would save far more money than it cost.
"Congress must fund the BORDER WALL," Trump tweeted after leaving the border.
California has been at the forefront of resistance to the Republican leader's anti-immigration agenda and at odds with his stance on a number of other issues, from gun control to marijuana and the environment.
Trump skewered California's Democratic Governor Jerry Brown, saying he'd done "a terrible job" of running a state where the taxes were "way out of whack" and criminals were allowed to roam free in sanctuary cities.
He said he had seen estimates that the "intolerably high" illegal immigration costs came to $100 billion a year in terms of drugs, crime, education and social services.
The hulking prototypes can be seen from across the border in Tijuana, where residents are not overly impressed with the real estate tycoon, who launched his presidential campaign calling Mexicans "criminals" and "rapists."
"This is an environmental catastrophe, on top of a misallocation of government resources that could be used for health care or social services," Cody Petterson, president of the San Diego County Democrats for Environmental Action, said of the wall.
Demonstrators draped themselves in US flags and waved placards emblazoned with slogans such as "Humpty Trumpty will fall off his wall," "Resist unstable idiot," and "No hate in the Golden State."
'You can get over it'
Among Trump's supporters, Kira Innis, 31, said she was backing Trump "because he doesn't give a good gosh darn about somebody's color, he cares about putting more green in their pocket."
On the Mexican side, federal police had to persuade around 50 demonstrators not to burn a yellow-haired pinata in Trump's likeness.
Pointing to one of the prototypes towering behind the corrugated metal border fence, Eladio Sanchez, 30, admitted that it might slow him down, but noted: "You can get over it anyway."
The border with Mexico stretches nearly 2,000 miles (3,200 kilometers) and about a third of it already has some type of barrier or wall.
Trump's insistence that Mexico pay for the wall has soured relations and Mexican President Enrique Pena Nieto recently canceled plans to visit Washington amid continuing disagreement.
"I have a great relationship with the president of Mexico, a great guy," Trump said, adding that "we're trying to work things out."
Before leaving San Diego, a military port, the president congratulated troops at Miramar Marine Corps Air Station on the coalition's taking back "almost 100 percent" of the Islamic State group's captured territory in Syria and Iraq.
"They never got hit like this. We took off the gloves. In one year we did more damage to ISIS than other administrations, a certain other administration, did in many years," he said.
He didn't name which of his predecessors he was referring to, although the Islamist insurgency's most significant advances were made after 2013, during Barack Obama's second term.
Trump is expected to wrap up his visit with an evening of fundraising in Beverly Hills to raise money for his 2020 re-election campaign.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)