Germany thumped Slovakia 3-0 with goals from
Central defender Boateng, who had been passed fit after an injury, connected perfectly with a clearance in the eighth minute to volley home from 25 metres for his first international goal as the world champions took control from the start.
The Germans, who next face either holders Spain or Italy, saw Mesut Ozil's weak 13th minute penalty saved but Gomez made no mistake two minutes from halftime when he tapped home a perfect cut back from the marauding Julian Draxler.
Draxler, coming into the starting lineup for the lacklustre Mario Gotze, was then left with far too much space at the far post to volley in their third just past the hour as the Germans kept a fourth straight clean sheet at the finals.
Comfortable with either foot, the winger utilised his speed and intelligence to good effect, helping his side pin the Slovaks in their own half for much of the opening period.
Boateng opened the scoring with a deflected volley following a corner and ran to celebrate with team doctor Hans-Wilhelm Mueller-Wohlfahrt, who helped him recover from a muscle injury sustained in their last group game with Northern Ireland.
Ozil's weak penalty, well saved by Matus Kozacik, was one of the few blemishes in an otherwise superb Germany performance.
Five minutes before halftime Juraj Kucka forced a flying save from Germany captain Manuel Neuer as he sent Peter Pekarik's cross toward the top corner.
Germany hit back immediately, Draxler turning Kucka inside out before squaring for Gomez to stab the ball home from close range to make it 2-0.
Slovakia were marginally better in the second half but when the excellent Draxler hooked a volley into the top corner in the 63rd minute there was no way back.
Draxler and Boateng were replaced by Lukas Podolski and Benedikt Hoewedes nine minutes later as the game took on the air of a friendly with Germany's place in the last eight against Spain or Italy already booked.