Barca headed into Wednesday's game with a 2-1 aggregate lead from last Wednesday's first leg, but Real started the stronger and carved open the hosts' defence on numerous occasions.
However, they failed to capitalise on their dominance, and Barca made them pay by taking a 2-0 lead through goals from Pedro Rodriguez and Dani Alves.
Los Blancos hit back through Cristiano Ronaldo and Karim Benzema, and while it was ultimately not enough to see them progress, many were praising Real's intent on Wednesday.
Nonetheless, Guardiola was quick to downplay their arch-rivals' performances, insisting Barca deserved to progress based on their displays over both legs.
"Madrid only did what we would have done in their situation," Guardiola said in his post-match press conference.
"The [Barcelona] players showed great strength and I congratulate them.
"Madrid are a great team and therefore this merits our victory - Madrid played a good game, but we were the victors over 180 minutes."
Barca are currently five points behind Real in La Liga, and will take on struggling Villarreal on Saturday.