The Poland international slotted home two spot kicks in the final 12 minutes to secure Jurgen Klopp's three badly needed points at the Coface Arena.
Having lost to Wolfsburg and Bayern Munich in the last two league outings, Pierre-Emerick Aubameyang gave Dortmund the lead after 70 minutes as he curled home a superb free kick.
However, Mainz was level within four minutes when Eric Maxim Choupo-Moting converted a penalty, after Lukasz Piszczek was penalized for a shove on Yunus Malli in the box.
Dortmund regained the lead through Lewandowski with 12 minutes remaining, as he calmly slotted home a spot kick of his own, after Elkin Soto denied a certain Aubameyang goal with his hand.
The defender was given a straight red for his actions before Lewandowski tucked away the third penalty of the match in injury time to secure Dortmund's victory.
Piszczek made his first start for Dortmund since May's Champions League final, with Kevin Grosskreutz moving into midfield alongside Sven Bender, who started despite breaking his nose against Napoli on Tuesday. Aubameyang replaced Henrikh Mkhitaryan in Dortmund's forward line.
Zdenek Pospech was named in the Mainz starting XI, meanwhile, despite having been taken off in last Sunday's 3-2 win over Werder Bremen, while Shinji Okazaki led the line having scored four times in his last four Bundesliga games.
The hosts began brightly and saw long-range efforts from Pospech and Johannes Geis spilled by Roman Weidenfeller within the opening 11 minutes as the club looked to record its third straight Bundesliga victory.
Park Joo-Ho was next to threaten, with his acrobatic overhead kick from inside the area comfortably dealt with by the Dortmund goalkeeper.
The visiting side's first effort on goal came through Lewandowski after 25 minutes, with the Poland international expertly controlling a Marco Reus cross before miscuing his effort and firing wide.
Bender was replaced by Nuri Sahin just after the half hour mark before both sides hit the crossbar in the final minutes of the opening period.
Mainz defender Stefan Bell first saw his header hit the woodwork from a corner, before Aubameyang's dipping strike was tipped onto the frame by Loris Karius.
Weidenfeller was then called on to make a great save from Choupo-Moting's fierce drive two minutes into the second half before Okazaki fired over from the left side of the area.
It was Dortmund which took the lead 20 minutes from time, though, with Aubameyang's expertly-hit free kick putting the visiting team ahead.
However, the joy was short lived as Piszczek bundled Malli over in the area before Choupo-Moting leveled from the spot.
Jurgen Klopp's side hit back almost immediately when Lewandowski converted from 12 yards following Soto's cynical hand ball to deny Aubameyang a second.
And there was time for Lewandowski to grab his second of the game, scoring from the spot again after Erik Durm was fouled in the area by Karius to ensure Dortmund recorded its fourth successive win at Mainz.