Bayern Munich closed the gap on league leaders Borussia Dortmund, with a 3-1 win away at Hoffenheim as the Bundesliga returned from its winter break.