In short, a canonical transformation is a transformation of the phase space coordinates which maps Hamiltonian flows onto Hamiltonian flows and a gauge transformation defines equivalence classes on field potential functions which leaves "physical fields" invariant.