He fired the home side into an early lead, chipping the ball over the goalkeeper after forward Guido Burgstaller sent him through in the 13th minute.
It brought Goretzka's scoring streak to three consecutive games for Schalke, while he also scored twice for Germany recently in a 2018 FIFA World Cup qualifier against Azerbaijan. He has six goals in 12 games for the national side.
The 22-year-old Goretzka, whose contract is up at the end of the season, is reportedly a target for Bayern Munich and several other sides. He has so far refused to commit to Schalke, but said recently he hadn't decided against staying at the club.
Schalke contained Mainz until the end of the first half, when midfielder Danny Latza forced goalkeeper Ralf Fahrmann into action.
Burgstaller wrapped up the win in the 74th minute when he followed up after Rene Adler saved Brazil defender Naldo's header from a corner.
Bibiana Steinhaus, the first female referee in the Bundesliga, officiated for her second game in Germany's top flight.