An unmarked Herrera opened the scoring for Mexico within two minutes of the opening whistle, turning in Jesus Corona‘s corner at the far post.
Less than 90 seconds later, Mexico were 2-0 up after Funes Mori made the most of Hirving Lozano‘s scuffed shot and fired past Nigeria keeper Stanley Nwabali.
Herrera added his second in the 52nd minute before Dos Santos rounded off the night with a controlled finish 12 minutes from time.
Mexico will face off against Curacao, El Salvador and a qualifier are in Group A when the Gold Cup group stage kicks off on July 10.
Group B sees the U.S., Martinique, Canada and a qualifier; Costa Rica, Jamaica, Suriname and a qualifier are in Group C; and Grenada, Honduras, Panama and invited guest Qatar are in Group D.
The top two nations in each group advance.
The final is Aug. 1 in Las Vegas.