Peter Bosz’s side are looking to win the competition for only the second time in the club’s history and join Bayern Munich and Saarbruecken in the last four.
Marcus Ingvartsen gave the visitors a 39th-minute lead, arriving at the back post to meet Marius Buelter’s cross and power a header into the bottom corner.
But Union, who were Cup runners-up to Schalke as a third-tier side in 2001, were dealt a massive blow 19 minutes from time as defender Christopher Lenz was dismissed for a second yellow card.
Leverkusen wasted little time in making Lenz pay, as Karim Bellarabi equalised just a minute later, drilling a low effort into the bottom corner after being played in on goal by Kai Havertz.
The hosts completed the comeback as Chilean international Charles Aranguiz headed home Kerem Demirbay’s 86th-minute corner before Moussa Diaby added gloss to the scoreline in injury time.
Later Wednesday, Andre Silva and Daichi Kamada scored as Eintracht Frankfurt made the semi-finals with a 2-0 home win over Werder Bremen.
Portuguese striker Silva scored the opener deep into first-half injury time from the penalty spot.
Japanese star Kamada tucked away the second goal on the hour when he volleyed home a cross from Filip Kostic.
However, Kostic will miss the semi-finals after being red-carded for a crunching foul on Omer Toprak.
On Tuesday, holders Bayern Munich continued their bid for a treble of Bundesliga, Cup and Champions League titles by edging past Schalke 1-0, while Saarbruecken stunned top-flight Fortuna Duesseldorf on penalties to become the first fourth-division side to reach the semis.