After the two teams could not be separated after 120 minutes, Brazil eventually eliminated Mexico on penalties as they go for gold.
Miles Robinson headed in the 118th-minute winner as the United States won another title after June's CONCACAF Nations League success.
Mexico missed a second-half penalty before Hector Herrera netted late to keep their bid for a 12th Gold Cup alive.
Substitute Hirving Lozano's brace lifted Mexico to a 2-1 friendly win over Iceland in Texas.
Subscribe To Our Daily Newsletter And Get News Delivered Straight To Your Inbox.