Williams took the final two sets against the unheralded 19-year-old Hercog, winning by a 2-6, 6-2, 6-3 score.
Williams, the former world No. 1, followed up her win in Dubai last week with another triumph in Mexico, successfully defending her Acapulco title and notching her 43rd career singles title.
Hercog, facing Williams for the first time, was playing in her first-ever WTA final.
Williams pocketed $37,000 with the win, while Hercog collected $19,000 as the runner-up.