The 14th seed looked to be cruising, leading 4-0 in the opening set, before a stunning collapse which saw the Chinese win 12 of the next 14 games to earn a 6-4 6-2 win.
Wozniacki was not happy on Court Three, regularly complaining about line calls and Hawkeye while Zhang followed up her first-round win over 23rd seed Caroline Garcia.
Zhang, who wrapped up victory in 80 minutes, will now play Viktorija Golubic or Dayana Yastremska.
Elsewhere, eighth seed Elina Svitolina moved into the fourth round with a battling 6-3 6-7(1) 6-2 victory over Greece's Maria Sakkari, needing six match points to win the contest.
Wimbledon champions since 2000
Show all 38
Svitolina had two match points in the second set which were saved and the Ukrainian also needed treatment on her right foot before bouncing back in the final set, as Sakkari made a total of 48 unforced errors.
Join our commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies
Join our commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies