Boateng volleyed home the opener, his first goal for his country, just eight minutes in, before Mesut Ozil saw a 13th-minute penalty saved by Matus Kozacik following a Martin Skrtel foul on Gomez.
The world champions got the second goal their play deserved on 43 minutes at the Stade Pierre-Mauroy as Julian Draxler set up Gomez to double their advantage.