Bayern Munich kept pace with Leverkusen in the Bundesliga title race with a 3-1 win over Monchengladbach.