Mueller sustained a hip injury and was replaced by Christian Wetklo at the break. The new Mainz goalkeeper was quickly called into action, tipping Sascha Moelders' header over in the 47th, and then emerging from goal to claw the ball away from Hahn's feet in a one-on-one two minutes later.
Hahn recovered the ball, however, and curled it into the unguarded net from a difficult angle for his fourth goal of the season.
Halil Altintop hit the crossbar for Augsburg, before Mainz substitute Eric Maxim Choupo-Moting pulled one back from the penalty spot in the 59th, after Sebastian Polter went down under what seemed like light contact from Jan-Ingwer Callsen-Bracker.
Polter sought another penalty two minutes later but was booked for diving.
Wetklo was sent off with two minutes remaining for bringing down Arkadiusz Milik outside the penalty area. Polter had to go in goal and he saved Baier's effort from the resultant free kick.
"It was really dramatic," Augsburg general manager Stefan Reuter said. "We had quite a few chances and are overjoyed to have secured the three points."
Sergio Garcia scored late for Werder Bremen to come from behind and beat Hannover 3-2 in the late game.
Szabolcs Huszti's penalty gave Hannover the lead in the 20th minute, but Aaron Hunt equalized with another penalty five minutes later.
Cedrick Makiadi put the home side in front with a close-range header in the 38th, only for Hiroki Sakai to equalize with a stunning strike in off the underside of the crossbar three minutes later.
Garcia completed Bremen's first come-from-behind win since November last year in the 86th, when he prodded home the rebound after Ron-Robert Zieler blocked his initial header from Hunt's free kick.
"Football is quite simple. When you lose 3-2 you didn't do your job at the back and you didn't do enough up front," Hannover captain Lars Stindl said, following his side's fifth defeat from five away games this season.
On Saturday, Bayern Munich won 2-1 at Hoffenheim to stay one point ahead of Borussia Dortmund, which had provisionally taken the Bundesliga lead Friday with a 6-1 rout of Stuttgart. Bayer Leverkusen is three points behind Dortmund after a surprise loss to bottom side Eintracht Braunschweig on Saturday.