Pep Guardiola's City bounced back from 0-2 to win 3-2 against Aston Villa.
Jarrod Bowen had scored twice in the first half to give West Ham a 2-0 lead.
Liverpool won 6-5 in shootout after it ended 0-0 at the end of extra time.
Pep Guardiola's side crushed Newcastle 5-0 at the Etihad Stadium.
Liverpool, who were down 2-0 in the first half, came back with three goals in a 12-minute spell, registering a 5-2 aggregate victory over Villareal.
Burnley's revival under caretaker boss Mike Jackson continued as a thrilling 2-1 win at Watford pulled them five points clear of the relegation zone.
Liverpool did enough to build themselves a solid lead for Tuesday's return game in Spain where they will be confident of finishing off the job.
Chelsea kept a grip on third place but needed a last-minute goal from American Christian Pulisic to beat West Ham United 1-0 at Stamford Bridge.
Cristiano Ronaldo received an outpouring of solidarity from Manchester United fans and their Liverpool counterparts during a Premier League match he missed after the death of one of his new-born twins.
After a 5-0 win at Old Trafford in October, this was another humiliation of United by Juergen Klopp's team, who were barely threatened by their lifeless opponents.