Rodri’s header from a Phil Foden free-kick gave City a hard-fought half-time lead before Nathan Ake’s close-range finish from a corner gave them breathing room.
Gabriel Jesus scored a crucial third goal and substitute Fernandinho pulled off a low finish in time to lift City a point ahead of Liverpool, who had won at Newcastle earlier in the day.
Guardiola said: “I think the result looks more comfortable than it really was, but I couldn’t have expected anything else.
“We knew it. Between Champions League games it’s always difficult to stay in the Premier League, especially away, especially at Elland Road, especially at a ‘final’ (for Leeds).”
City will now travel to Madrid with a 4-3 advantage after Tuesday’s thrilling first leg at the Etihad for Wednesday’s Champions League semi-final second leg.
The City boss was visibly relieved to have sidestepped a potential banana peel at Elland Road against a Leeds side desperate for points to beat the drop.
“Given the circumstances we have with the Champions League, it was a really good result,” said Guardiola.
“Since I arrived (in City) I often hear what Elland Road means. Last time we came here Marcelo Bielsa was manager and it was behind closed doors so I couldn’t feel it. Today I felt it, so I know why this is so special.
“Ended 4-0 down fighting to stay in the Premier League and singing, singing, showing support.
“Leeds are one of the biggest teams in this country and I have a special sympathy that Marcelo was here and hopefully they can stay up there but that’s why we talked about it being difficult today.”
City’s four goals put them within a goal difference of Liverpool and Guardiola can see a clearer path ahead in defending the domestic title.
“We stuck together and reduced the goal difference. I don’t know if it’s important – but it’s up to us,” he added.
“Newcastle, Wolves, West Ham and Aston Villa. We know exactly what we have to do and we agree.
“We win, we become champions. We draw, they (Liverpool) are champions.”
Leeds boss Jesse Marsch was optimistic after his side’s first loss in six games left them a place and five points above third-bottom Everton, who have two games in hand.
The Yorkshire club were also more unlucky with injuries when Stuart Dallas was carried off the field with a season-ending knee injury after a 50-50 foul with Jack Grealish.
Marsch said: “He’s been scanned but I don’t want to speak too soon. It’s not great, but we’ll see.”
Leeds were greatly improved after Monday night’s goalless draw at Crystal Palace but were thwarted by set pieces for both of their opening goals.
“If you take out those two goals, the first 70 was pretty good,” added Marsch. “A team like City can hurt you in so many ways but we had a lot of control.
“I challenged the boys and I’m proud of them. The best part is that we saw the reaction from the fans.
“A 4-0 home loss and you saw so much passion and love for this team and this club.
“Some people might feel that I was joking about best club (Leeds) versus best team (City) but I was serious about that.”
https://www.independent.co.uk/sport/football/leeds-elland-road-pep-guardiola-champions-league-premier-league-b2069208.html Pep Guardiola celebrates a ‘really good result’ as he double chases Man City and beats Leeds