Two second-half goals from the Catalan outfit completed the comeback after Cristiano Ronaldo fired the hosts ahead at the beginning of the first half.
However, Guardiola has dismissed suggestions that his club have a big advantage going into the return leg next week.
"We knew we had to score, but the tie isn't over – Madrid always keep on fighting," he told reporters after the match.
"Now focus on league game in four days."
Barcelona welcome Malaga to the Nou Camp this weekend, while league leaders Real Madrid take on Atletico Bilbao.