Williams, 38, raced to a 5-2 in the opening set before Sakkari drew level but the American raised her game again to take the early advantage in the rain-delayed contest.
Williams trailed 3-1 in the second set before reeling off four games in a row and was serving for the match when things began to fall apart.
The 23-times Grand Slam champion, who has a history of blood clots and pulmonary embolisms.
"I've been a little bit of a recluse," Williams, 38, said on a video call from Lexington, Kentucky where she will compete in next week's Top Seed Open.