Barrera scored for Mexico in the 28th minute after the U.S. took a 2-0 lead with goals from Michael Bradley and Landon Donovan.
Andrés Guardado tied the game seven minutes later and Barrera put Mexico ahead four minutes after the break. Giovani Dos Santos added the fourth goal at 76 minutes.
Mexico now holds a 6-4 lead over the U.S. in the regional soccer title which was started by the Confederation of North, Central America and Caribbean Association Football in 1991.
The U.S. beat Panama 1-0 in the semifinals to reach its fourth straight Gold Cup final. Mexico reached the championship game after defeating Honduras 2-0 in extra time.
To contact the reporter on this story: Nancy Kercheval in Washington at firstname.lastname@example.org
To contact the editor responsible for this story: Michael Sillup at email@example.com