They also lost their Champions League round of 16 first leg 1-0 at Basel in midweek.
Frenchman Ribery then grabbed his 10th league goal early in the second half, firing in from a tight angle inside the box minutes after Bayern’s Holger Badstuber rattled the bar with a powerful header.
“We are back in the game,” Ribery, who combined well with fellow winger Arjen Robben throughout, told reporters. “We showed a good reaction. Now we have to keep winning and wait for Dortmund to slip up.”
The win lifted Bayern to 48 points, one ahead of third-placed Borussia Moenchengladbach, who drew 1-1 with Hamburg SV on Friday. Schalke remain fourth on 44.
Champions Dortmund were at home to Hanover 96 later on Sunday.
Bayern coach Jupp Heynckes opted to bench playmaker Toni Kroos and instead deploy Thomas Mueller in a central role between Ribery and Robben as he reshuffled the team in search of more offensive spark.
The gamble paid off as the trio were a constant threat to the Schalke defence.
Former Germany international Hildebrand was on hand to deny Robben and Mueller before racing out of goal nine minutes from the break to stop Ribery and instead seeing the ball float over his head as the Frenchman snatched the lead.
Schalke’s Joel Matip should have levelled right after the restart when he was sent through with only keeper Manuel Neuer to beat but instead fired wide.
Bayern punished the visitors with Ribery combining well with Mueller in the box to grab his second goal of the day.
(For more sports news and updates, follow Ahram Online Sports on Twitter: @AO_Sports)