Michael Lang scored at the death to condemn United to a 1-0 defeat, denying the Premier League giants qualification for the last 16.
It was also United's first loss in Group A and Basel's most famous supporter, 19-time grand slam champion and Swiss star Federer, revelled in the memorable win.
"Words can't possibly describe this incredible moment for this club, wow!!!! Congrats to the team," Federer wrote on Twitter.
Words can’t possibly describe this incredible moment for this club, wow!!!!— Roger Federer (@rogerfederer) November 22, 2017
Congrats to the team https://t.co/qvEOCHoSmN
Basel have the opportunity to qualify for the knockout round, with Raphael Wicky's men second and ahead of third-placed CSKA Moscow heading into the final matchday, while United are three points clear at the summit.