The result gives them a slender advantage to take to the Bernabeu for the second leg, but it also could have been much better for his side.
Kevin De Bruyne gave Man City an early lead and Gabriel Jesus doubled in in the 11th minute.
Karim Benzema halved the deficit just after the half hour, but Man City looked like they were in total control again thanks to Phil Foden's goal early in the second half.
However, Vini Jr reduced the arrears again immediately, and although Bernardo Silva got a fourth for Man City, Real Madrid pegged them back again thanks to a Benzema penalty.
Guardiola, though, was keen to focus on the positives, and he was wowed by the quality on display from both sides.
"It was a good game of football - both teams with an incredible amount of quality players on the pitch with incredible personality to play," Guardiola said.
"The result is what it is. We won, we are going to rest, then play Leeds and travel to Spain next week. To win this competition, from my small experience, you have to overcome situations like football gives in front of you.
"The result could be better, but Madrid is always Madrid. It doesn't matter if 1-0 up or two or three, you have to perform really well two games.
"We performed really well the first one. We have to do it the second one. It is a good test to show our personality as a team and we are going to travel there to win the game."
"We miss them but we create them. We were there all the time. We were there. Listen, not one complaint about the result, the performance, anything.
"I am so proud, I'm so incredibly happy of the way we performed in front of the world against a team that have an experience with that. We did everything to win and with courage, with the ball, without the ball."
Despite the positivity, Guardiola admitted Man City will need a big improvement from their second half performance to advance.
"If we play the way we did in the second half against Real Madrid, we won't be able to win," he said.
"But if we play the way we did at periods today we'll be able to do it. We want to see ourselves in such an important setting as the Santiago Bernabeu. We want to be there to put on a good show.
"That's what I want to tell my players to do - don't think about anything else, think about going to the Bernabeu and putting on a good show, which could give you a victory.
"When I became a footballer, then as a manager, when I went with Bayern Munich there, you have to be yourself and really be truly yourself otherwise you've got no option to win."