Sharapova was pushed to three sets for the third straight match in Stuttgart and missed a chance to serveout the match in the ninth game after taking a 5-3 lead.
Federer finally put the German out of his misery with a blistering serve on his first match point to move to within one victory of his ninth title of the year.
In the second set, Clijsters gained an early break, saw off a break point in the fifth game to hold for a 4-1 lead, and she fought back from 0-40 down to serveout the match.