The Swiss maestro found himself with his back to the wall after an error-strewn loss to Kei Nishikori in his opening round-robin match -- his first straight sets defeat in 46 group stage matches at the season-ending showpiece.
Another loss would have made it impossible for him to reach the semi-finals for the 15th time in 16 appearances at the tournament.
Yet 48 hours later, the 37-year-old Federer looked much more like his old smooth self as he rebounded in style, to the delight of the majority in the packed stadium.
Whereas he struggled for timing and was a little grumpy on Sunday against Nishikori, Federer found his groove from the start against Thiem as he hunted an early break.
Thiem saved a break point in the opening game but at 1-1 he sent a forehand long to give Federer the advantage he never really looked like relinquishing.
Two tame volley errors by Thiem gave Federer another break for a 5-2 lead as he cruised to the opening set.
Federer turned the screw to break again immediately in the second set and never looked in any danger of a defeat which would have made it impossible for him to reach the semi-finals.
Tournament debutant Anderson leads the group with two wins after thrashing Japan's Kei Nishikori 6-0 6-1 earlier and would have been assured of a semi-final spot had Federer been beaten by Thiem or even dropped a set.
As it stands Federer will likely have to avenge his Wimbledon loss this year by Anderson to reach the semi-finals although all four players in the group could still mathematically progress. (Reporting by Martyn Herman Editing by Toby Davis)
(This story has not been edited by Devdiscourse staff and is auto-generated from a syndicated feed.)