The win ensured Jamaica became the first Caribbean team to reach the Gold Cup Final since its inception in 1991.
The Reggae Boyz will face Mexico in Philadelphia on Sunday after El Tri overcame 10-man Panama 2-1 after extra-time with two late penalties in a feisty affair.
Hosts USA, the 2013 champions, had reached five successive Gold Cup finals and had thrashed Cuba 6-0 in the quarter-finals, but they were stunned by an early Jamaican onslaught.
Mattocks, who was suspended for his team’s quarter-final win over Haiti, struck in the 31st minute with a header before Barnes scored from a free-kick five minutes later.
USA captain Michael Bradley dragged his side back into the match with a goal in the 48th minute but they were unable to find an equaliser despite pressuring Jamaica goalkeeper Ryan Thompson for much of the second half.
Mexico late show
In the late match at the same venue, Mexico edged out Panama to reach their fourth final in the last five tournaments.
Andres Guardado netted two late penalties to lead Mexico to victory over a Panama side, who were reduced to 10 men after 20 minutes when forward Luis Tejada was shown a red card for raising his arm into the face of Francisco Rodriguez.
Despite Tejada’s departure, Panama took a 1-0 lead when Roman Torres scored in the 57th minute and looked set to reach the final as they held on to the advantage with just two minutes remaining.
However, American referee Mark Geiger awarded a penalty to Mexico after Torres had fallen on the ball in the area and was adjudged to have handled when it wedged under his body.
The contentious decision triggered a heated confrontation between both sides and delayed the match for a lengthy period.
Guardado eventually converted the penalty to force extra-time, then Mexico were awarded another less controversial spot-kick when Panamanian defender Harold Cummings upended Javier Orozco shortly before half-time in the additional period.
Guardado once again scored from the spot and Mexico held on to advance to the final.
The Mexicans had defeated Costa Rica in equally controversial fashion in the quarter-finals when Guardado scored a contentious 124th-minute penalty to secure a 1-0 victory.
Panama coach Hernan Dario Gomez was left fuming after his side’s defeat to Mexico.
“This is a big robbery,” Gomez said. “It was robbery at gunpoint. It’s a very sad thing to say. We were robbed.
“The referee made a monumental error and all this great effort was thrown away because of this. We have to make sure this doesn’t happen again.”