Two goals in the first 15 minutes seemed to spell doom for the visitors, but they made a game out of it with a second-half penalty, before Kroos' late goal settled mattersBayern Munich maintained its place atop the Bundesliga with a 3-1 victory over Mainz at the Allianz Arena on Saturday.
Mario Mandzukic slotted the hosts into the lead after only two minutes of play, before Bastian Schweinsteiger doubled their advantage with a header just before the quarter-hour mark.
What threatened to be a demolition job never occurred though, as despite large spells of Bayern pressure, Mainz was able to work itself back into the game.
Adam Szalai handed the visitors hope with a penalty in the 59th minute, but there was no more to come from the visitors, as Kroos scored with a well-taken volley in stoppage time to wrap up the points for the hosts.
There was no place in the matchday squad for Arjen Robben and Frank Ribery, with both players sitting out the match after picking up injuries last week. However, Bayern barely noticed the absence of its wing wizards, as it raced into the lead after only two minutes.
Thomas Muller did the hard work, racing onto a loose ball at the edge of the box and squaring to Mandzukic, who made no mistake in front of an unguarded net.
The home side looked to move forward through the flanks, as it peppered the Mainz goal with a host of crosses from out wide. This avenue of attack brought reward in the 13th minute as Schweinsteiger put Bayern two goals ahead.
Badstuber was the supplier, whipping in an inch-perfect cross into the heart of the area that the midfielder attacked, unmarked, to head home.
All signs pointed to a thrashing in the making, but Bayern did not seem in any rush to add to its two goal cushion, instead finding comfort in keeping the visitors trapped chasing shadows in their own half, without really finding the cutting edge of the opening exchanges.
The visitors were able to raise their game slightly, but despite fashioning a few relatively promising openings, they never managed to call Manuel Neuer into action as the first half drew to a close.
With just under an hour gone, Mainz's endeavor was rewarded as a moment of carelessness from Dante handed it a lifeline.
The Brazilian was late in challenging Baumgartlinger inside the area, leaving the referee with little choice but to award a penalty. Szalai sent Neuer the wrong to bring the visitors to within a goal.
The third goal would come though, and it arrived via the boot of Kroos, who volleyed home expertly at the far post from Javi Martinez's cross to add gloss to the scoreline with the last kick of the game.