We study the onset of chaos due to temporal and spatially periodic perturbations in charged Gauss-Bonnet AdS black holes in extended thermodynamic phase space, by analyzing the zeros of the appropriate Melnikov functions. Temporal perturbations coming from a thermal quench in the unstable spinodal region of P-V diagram, may lead to chaos, when a certain perturbation parameter γ saturates a critical value, involving the Gauss-Bonnet coupling α and the black hole charge Q. A general condition following from the equation of state is found, which can rule out the existence of chaos in any black hole. Using this condition, we find that the presence of charge is necessary for chaos under temporal perturbations. In particular, chaos is absent in neutral Gauss-Bonnet and Lovelock black holes in general dimensions. Chaotic behavior continues to exist under spatial perturbations, irrespective of whether the black hole carries charge or not. 1 sm19@iitbbs.ac.in 2 chandrasekhar@iitbbs.ac.in 1 arXiv:1902.08932v3 [hep-th]