The centre-back made his final decision to step away from the pitch after his daughter's birth last month.
Victory means Real return to the top of the LaLiga table on 18 points from six games, two ahead of Barcelona in second.
Tensions boiled over in the closing stages and Atletico defender Felipe was sent off after receiving a second yellow card before the teams played out 12 minutes of added time.
United are left to focus on a Premier League campaign where they face a real battle to make the top four and earn a place in next year's Champions League.
Atletico had many opportunities to extend their lead and hit the post twice but were punished by a defensive mistake which gifted the ball to Bruno Fernandes 10 minutes from time.
Atletico won 3-1 at Porto in a tense, ill-tempered game as both sides finished with 10 men.
With four wins out of four, Juergen Klopp's side can now take their foot off the gas for the final two games of the group stage.
Atletico Madrid pipped city rivals Real Madrid to the title after Luis Suarez fired them to a 2-1 comeback win at Real Valladolid.
Atletico Madrid took a giant step towards the La Liga title in dramatic circumstances by fighting their way back to beat Osasuna 2-1 at home thanks to a late strike from Luis Suarez.
Real moved into second place on 78 points, two behind leaders Atletico Madrid with two games left to play. Barcelona are third, two points adrift of Real.