Hernandez backheeled the winner to send Mexico into the last four of the Gold Cup at the expense of Guatemala.
Mexico will now meet Honduras, who beat Costa Rica in the quarter-final after a shoot-out in the United States.
Guatemala took a surprise lead through Carlos Ruiz in the fifth minute, but Aldo de Nigris equalised three minutes after the break.
Hernandez claimed the winner after 66 minutes, flicking the ball in off his right heel after a low cross from right-winger Pablo Barrera.
It was 'Sweet Pea's' sixth Gold Cup goal and Mexico coach Jose Manuel de la Torre said: "This team is very strong at the core. They know they can overcome any adversity. We knew that we could come back and we did."