Gauge transformations are not canonical transformations
  In classical mechanics, we can describe the dynamics of a given system using either the Lagrangian formalism or the Hamiltonian formalism, the choice of either one being determined by whether one wants to deal with a second degree differential equation or a pair of first degree ones. For the former approach, we know that the Euler-Lagrange equation of motion remains invariant under additive total derivative with respect to time of any function of coordinates and time in the Lagrangian function, whereas the latter one is invariant under canonical transformations. In this short paper we address the question whether the transformation that leaves the Euler-Lagrange equation of motion invariant is also a canonical transformation and show that it is not. 
A.T.Suzuki, J.H.O.Sales