Federer broke Del Potro in the sixth game of the second set and rode the change in momentum to a 4-6, 7-6 (7-2), 7-5 victory that sent him on to the semifinals.
Federer, who was 2-1 in the Group B play, will face Group A winner Rafael Nadal Sunday.
Saturday's match was the third meeting in three weeks between Federer and Del Potro, who beat Federer in Basel but lost in three sets last week at the Paris Masters.
Djokovic completed round-robin play Saturday with his 20th straight match win, a 7-6 (7-5), 4-6, 6-3 decision over Frenchman Richard Gasquet.
Putin thinks Obama would save him if he were drowning
Members of Congress to keep receiving porn magazine