After the quarter-final tie in Leverkusen ended scoreless through 120 minutes, Bayern's five penalty takers all converted, while goalkeeper Manuel Neuer saved Josip Drmic's opener for the hosts to give the Bavarian visitors victory.
Leverkusen dominated the match with 12 shots to five, although both teams finished with three efforts on target, but Guardiola claimed his team produced a better defensive performance than in their previous meeting with Roger Schmidt's men.
In December, Bayern won 1-0 in Munich but Guardiola claimed he had spent a lot of time drilling his team in dealing with Leverkusen's counter-attacks following that Bundesliga fixture.
"If Bayer Leverkusen wins the ball they are looking for direct contact with the strikers. This is accomplished with players like Julian Brandt or particularly Karim Bellarabi," the Spaniard said at his media conference.
"That is not easy. We wanted to prevent these counter situations. In our home game against Bayer Leverkusen we had problems in the game design. We have done better today.
"Of course, it is not possible to deny all counter-attacks by Bayer Leverkusen for 90 minutes. But we have allowed less than in the game in Munich."
Bayern forward Thomas Muller, who scored his team's first penalty, conceded Leverkusen would not have been undeserving victors.
"It was a nerve-wracking game, Leverkusen could have definitely score a goal. It was very intense," he said.
Bayern will face bitter rivals Borussia Dortmund in the DFB Pokal semi-finals, while third tier club Arminia Bielefeld will host Wolfsburg for the other spot in the competition's decider.
It will be the fourth straight season that Bayern and Dortmund have met in Germany's national cup competition.
Bayern won last year's final 2-0 after extra-time and defeated Dortmund 1-0 in Munich in the quarter-finals in 2013, while in the 2012 final, Jurgen Klopp's men triumphed 5-2.
"[Bayern] will be delighted that the tie takes place at the Allianz Arena, and are also buoyed by last Saturday's tight but deserved 1-0 Bundesliga victory at [Dortmund's] Signal Iduna Park," a statement on the Bavarian club's website read.
Guardiola was simply happy to have led the club to their sixth consecutive DFB Pokal semi-final.
"Of course we are very satisfied," he said.
"All teams want to go to Berlin and now we have only one step ahead of us."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.