La Liga leaders Real, who face City in the first leg at the Etihad Stadium on Tuesday, are the most successful team in European Cup history, having lifted the trophy 13 times.
In contrast City, who have been the dominant force in English domestic football over the past decade, appeared in the Champions League final for the first time last year, losing to Chelsea.
City and Real also met in the semi-finals in 2016 when the Spaniards won 1-0 on aggregate, but City avenged that loss with a last-16 triumph in 2020.
“If we had to compete with history, we wouldn’t have a chance,” Guardiola said at his pre-match press conference on Monday. “Their history speaks for itself.
“We have to have the desire to compete against them. To play against Real Madrid is an incredible test. We want to try it. We need to suffer, to stick together, when we have the ball, try to attack.
“It would be the same if we face Bayern Munich or Barcelona, the teams who have been here many times. A decade ago we weren’t here and now we are here. It’s good lessons for the future.”
Guardiola highlighted the experience of the Real players, many of whom have won multiple Champions League titles.
“We play against players who have been in this position many times,” he said.
“That’s why they have things that maybe still we don’t have. But maybe there are things we have they don’t have, I don’t know. At the end it is 11 v 11.”
Despite the pressure, the City boss also urged his men relish the occasion.
“Being in the semi-final is so good,” he said. “One day we will not be here because it’s so demanding — look at the big teams who are not here.
“I say to the players ‘enjoy that moment’. You never know if we will be back here at any stage.”
Guardiola said he would make a final decision on the fitness of defenders Kyle Walker and John Stones on Tuesday, admitting the pair were “doubts”.
Joao Cancelo will miss the game through suspension.