Holders Schalke dumped out of German Cup
Marco Reus struck twice and Juan Arango added another as Schalke, without coach Huub Stevens on the bench due to family reasons, ended the game with nine men after the dismissal of Klaas-Jan Huntelaar early in the second half and Jermaine Jones in stoppage-time.
"We have worked hard this year. You need players who understand what you want to do and my players are intelligent," said Gladbach coach Lucien Favre.
"We defended well in the first half and scored a goal but then we lost our concentration a bit. But it worked out in the end."
Kiel, who beat second division clubs Energie Cottbus and Duisburg in the previous rounds, took an unexpected lead when Mainz' Anthony Ujah headed a corner into his own net after six minutes on a rugged pitch suitable only for lower division play.
The hosts doubled their lead in the 63rd minute when Steve Muller fired in completely unmarked at the far post after a 30-metre free-kick to spark wild celebrations among the northern club's 10,000 fans.
"It is sometimes not easy to come back from a goal down against us," said Kiel coach Thorsten Gutzeit. "We were lucky at the right times today, we scored our goals at just the right time."
Hertha Berlin, with assistant coach Rainer Widmayer in charge after the sacking of Markus Babbel and Michael Skibbe announcing he was taking over from January 3, beat Kaiserslautern 3-1 to advance.
VfB Stuttgart scored all three goals in their 2-1 win over Hamburg SV, with Cacau striking twice and William Kvist scoring an own goal as they ended their opponents' nine-match unbeaten run under coach Thorsten Fink.
In a fiery encounter, Gladbach took the lead with Juan Arango's smooth left-footed curled drive from 16 metres.
Schalke then had top scorer Klaas-Jan Huntelaar sent off two minutes after the restart for dissent and it did not take long for the hosts to make the extra man count with Reus finding lots of space just outside the box to fire in for a two-goal cushion.
Gladbach missed a handful of clear scoring chances as they dominated but substitute Julian Draxler cut the deficit in the 70th, tapping in after keeper Marc-Andre ter Stegen had briefly saved a Manuel Jurado shot.
Germany international Reus settled any Gladbach nerves when keeper Lars Unnerstall failed to clear the ball allowing the forward to score in an empty goal before Schalke's Jones was sent off with a second yellow card in stoppage time.
"We made our lives difficult with the first sending off right after the restart. Gladbach's third goal then broke our backs," said Schalke's Draxler.
On Tuesday Bayern Munich needed a stoppage-time goal by Arjen Robben to beat VfL Bochum while 10-man Borussia Dortmund also booked their last eight ticket with a 5-4 penalty shootout win over second division leaders Fortuna Dusseldorf after a goalless 120 minutes.