Thermodynamics of phase transition for a black hole in 5D Einstein-Gauss-Bonnet gravity with a negative cosmological constant is studied.As the Bekenstein-Hawking entropy is adopted,we find the heat capacity,volume expansion coefficient and isothermal compressibility are divergent at the critical points,which implies the existence of phase transitions.The fact that the phase transitions are indeed second order is revealed by studying the Ehrenfest's equations and the Prigogine-Defay ratio.Furthermore near the critical points,we also explicitly calculate the critical exponents of the relevant thermodynamic quantities at fixed charge or fixed temperature.It is shown that the corresponding critical exponents satisfy the thermodynamic scaling law.The Generalized Homogeneous Function hypothesis is also checked by studying the Helmholtz free energy,which is shown to be consistent with the thermodynamic scaling law.