Mexico, record eight-times Gold Cup champions, reached Sunday’s decider with a 3-0 win over Jamaica in Las Vegas.
Mexico will start as favourites against a Panama team that have never won the regional competition for North and Central America and the Caribbean – but have reached the final twice before, losing to the USA in 2005 and 2013.
The USA, who selected a squad without their main Europe-based players, miss out on a place in the final for only the second time since 2003.
They bowed out on penalties after the game ended 1-1 after extra-time.
“Getting into this final is the dream of every Panamanian. We had to suffer to get this victory but that is how it is best savoured,” said Panama coach Thomas Christiansen.
The USA started brightly in the late afternoon Californian sunshine, with Cade Cowell hitting the post in the first minute.
Panama had an effort from Edgar Barcenas in the 29th ruled out for offside and American goalkeeper Matt Turner had to be alert in the 53rd minute to keep out a header from Ismael Diaz.
Brandon Vazquez, given a start after three goals in the tournament as a substitute, then missed a good opportunity, firing high from close range after good work from Cowell.
There was drama in stoppage time when Diaz had the ball in the net but was flagged for offside.
Panama claimed that Djordje Mihailovic had handled the ball but VAR found nothing and backed the offside call.
The USA had needed extra-time and penalties to get past Canada in their quarter-final, but they were short of creativity against a determined Panama.
Panama grabbed the lead in the ninth minute of the first period of extra-time when Adalberto Carrasquilla lofted the ball over the top and Ivan Anderson went round the out-rushing Turner and slotted into the unguarded goal.
But six minutes later the USA levelled through a Jesus Ferreira volley after Jordan Morris had headed down a long ball into the box. With both sides tiring in the heat, the game went to the shoot-out.
There was an unsavoury moment when US defender Matt Miazga, after converting his kick, shouted in the face of Cecilio Waterman as he walked up to the spot. The Panama forward kept his cool and slotted home.
That kick took the contest into sudden death and goalkeeper Orlando Mosquera was the hero, diving to save Cristian Roldan’s effort.
That left Carrasquilla needing to convert for victory and the midfielder made no mistake to set off the celebrations for the Central Americans.
USA interim coach B.J. Callaghan, who will now be replaced by the returning Gregg Berhalter, said despite the defeat his young team had gained valuable tournament experience.
“What I said to the guys was I’m super proud of them. I’m super proud that they stuck together, they continued to respond to adversity,” he said.
“This is going to hurt in the short term, but I truly believe in the long term we’ve gotten a lot of players a lot of experience, and it’s going to pay dividends for us in the future.”
Mexico got off to a flying start against the Reggae Boyz, taking the lead in the second minute through a clinical finish from Henry Martin.
Luis Chavez doubled the lead on the half hour with a magnificent free-kick which rose over the wall and then dipped under the bar into the top corner.
Michail Antonio went close twice for Jamaica in the second half but Mexico remained in control and made sure of victory and a place in the final in Las Vegas when Roberto Alvarado side-footed home a low cross in stoppage time.