It was the 46th career title for the seven-time Grand Slam champion, who showed her guile in the showdown between the two former world number ones to win 2-6, 6-3, 6-3 in just under two hours.
Wozniacki controlled the pace of the match through the first nine games, breaking Williams in the third and fifth to take the first set.
When she broke again at the start of the second it was the wake up call Williams needed -- the serve that had deserted the 34-year-old until then suddenly found its mark and her powerful ground strokes stayed in.
"It felt good to figure it out and run away with it a little bit."
More From This Section
Williams broke back twice to take the second set, sending the final into a decider where she broke to go 3-1 up and settled the outcome with her fourth match point when Wozniacki was serving at 3-5.
The result leaves Williams unbeaten after six matches in her head-to-head record with Wozniacki, although for the first time the world's eighth-ranked player has taken a set off the American.
"By the time you're 34 you have a lot of experience and if you can stay in shape, stay fit, can move and hit the ball and don't have five kids at home then why not?" she said when questioned about possible retirement.
"There's nothing holding me back from being here and doing well. Of course I can't play forever. Someone else has to take the torch at some point. While I'm here I'm enjoying it.