Leon Goretzka has been linked with a move to Arsenal this summer
The Schalke midfielder swept home a Benjamin Henrichs pass from 20 yards and then slotted home from Timo Werner’s through ball.
Werner then tapped home Jonas Hector’s pass to increase Germany’s lead.
Marco Fabian scored a brilliant 35-yard strike for Mexico, before Amin Younes added a fourth for Germany.
Mexico had plenty of chances to come back into the game at 2-0 down but squandered them.
Fabian’s stunner came too late to threaten a comeback, although there was a chaotic ending with several chances at both ends.
While Germany go onto Sunday’s final in St Petersburg, Mexico face Portugal in a third-fourth play-off earlier that day.
Future looks bright for Germany
Timo Werner scored Germany’s third to join Leon Goretzka on three goals for the tournament
Germany boss Joachim Low left most of his regular star players at home, including Manuel Neuer, Jerome Boateng, Mesut Ozil, Toni Kroos and Thomas Muller.
That their weakened squad includes first-team players from Barcelona, Bayern Munich, Manchester City, Paris St-Germain, Arsenal and Liverpool speaks a lot about the strength in depth of German football.
Germany have two young teams in international finals this weekend. Five of the starting 11 in the Confederations Cup semi-final would have been eligible for Saturday’s European Under-21 Championship final against Spain – including Goretzka and Werner, who are now joint top scorers in the tournament with three apiece.
Despite their opponents having chances, Germany looked comfortable, with Goretzka impressive before he was replaced midway through the second half and Werner staking a claim to be Germany’s first-choice striker for next summer’s World Cup.
The RB Leipzig front man could have scored more, but attempted to poke one effort through Guillermo Ochoa’s legs, with the Mexican keeper blocking that effort, and put another shot wide from a wide angle.
Ajax’s Younes scored their late fourth, turning home a pass from fellow substitute Mere Can.
Twenty six shots. One goal. Mexico waste their chances
It took Mexico 89 minutes, but they finally beat Marc-Andre ter Stegen
With better finishing, Mexico could have revitalised a game that felt over within eight minutes. They had more than twice as many shots as Germany – 26-12 – and had more efforts on target too, eight to seven.
Fabian’s effort from a short free-kick was the best goal of the game.
At 2-0, Giovani dos Santos forced a save from Marc-Andre ter Stegen and Javier Hernandez shot over from six yards, while Hector Herrera and Raul Jimenez also tested the Barcelona keeper.
Jimenez went even closer when he hit the crossbar with a header in the 75th minute, although at 3-0 that would only have been a consolation.
After Younes made it 4-1 in injury time, Mexico still had time for more attempts with Hernandez clipping the post and Jimenez heading wide.
Mexico start their Gold Cup defence a week after their third-fourth play-off against Portugal.
However, only three members of the Confederations Cup squad are playing in the tournament for teams in North and Central America and the Caribbean.