The Argentine star returned from illness to score both goals at Celtic Park – the second from the penalty spot – to send the five-time European champions through as winners of Group C.
City recovered from a goal down in Germany to earn a 1-1 draw at Borussia Moenchengladbach as both sides finished with 10 men.
Raffael grabbed the opening goal for Gladbach on 23 minutes, but David Silva poked in Kevin de Bruyne's cross just prior to the break before Lars Stindl and Fernandinho saw red in the second half.
French champions Paris Saint-Germain seized control of their own destiny in Group A with a 2-2 draw away to Arsenal.
Edinson Cavani turned in Blaise Matuidi's cross at the far post to hand PSG an 18th-minute lead at the Emirates Stadium.
But the Gunners hit back on the stroke of halftime as Alexis Sanchez was brought down by Grzegorz Krychowiak and Olivier Giroud rolled home the resulting spot-kick.
Arsenal looked to be in pole position to finish top of the group when an attempted clearance from Marquinhos ricocheted off an unfortunate Marco Verratti and squirmed past Alphonse Areola for a fluke own goal.
But Lucas ensured Unai Emery's side departed with a point as his header from Hatem Ben Arfa's corner flicked off Alex Iwobi and flashed past David Ospina 13 minutes from the end.
Both PSG and Arsenal have 11 points with one match to play, but the French outfit own the head-to-head edge on away goals after the reverse fixture at the Parc des Princes in September finished 1-1.