Petra Kvitova recovered from a set down before defeating Ashleigh Barty 1-6 7-5 7-6 in the final of the Sydney International.