This is perhaps easier to see in ordinary quantum mechanics.
Consider a particle in an electromagnetic field, whose Schrodinger equation is given by
$$i\hbar \frac{\partial \psi}{\partial t} = \frac{1}{2m}(-i\hbar \nabla -q \mathbf{A})^2\psi+q\phi\psi$$
Under a $U(1)$ gauge transformation, the scalar and vector potentials transform as
$$\phi \to \phi- \frac{\partial \alpha}{\partial t}\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\mathbf A \to \mathbf A + \nabla \alpha$$
where $\alpha = \alpha(t, \mathbf x)$ is a generic function. One can check that the Schrodinger equation remains invariant only if the wavefunction too transforms under the gauge transformation,
$$\psi \to e^{iq \alpha/\hbar} \psi$$
We see that the gauge transformation only changes the phase of the wavefunction. As we know, in quantum mechanics states are defined only up to a phase. Therefore at the level of rays in the Hilbert space a gauge transformation sends a ray to the same ray, i.e. it is the identity transformation on states.
If instead of having a time and/or position dependent $\alpha$ we take $\alpha$ constant, then this is also a $U(1)$ phase transformation. It acts only on the wavefunction, and it is again the identity transformation on states.
However, there are also different types of global $U(1)$ transformations which do not lead to identity transformations on states. For example, consider the harmonic oscillator Hamiltonian
$$H = a^\dagger a$$
This is invariant under the transformation
$$a \to e^{-i\theta} a\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, a^\dagger \to e^{i\theta} a^\dagger$$
which is a global $U(1)$ phase transformation. This transformation is given by a unitary operator $G$ in such a way that
$$a \to G a G^\dagger = e^{-i\theta} a\\
a^\dagger \to G a^\dagger G^\dagger = e^{i\theta} a^\dagger$$
One can check that a suitable operator is given by
$$G = \exp{(i \theta a^\dagger a)}$$
However $G$ is not the identity transformation on states, as its action on a generic wavefunction $\psi$ is not given by "multiplication by a phase".
In other words, a gauge transformation is a "do-nothing" transformation on states, or equivalently a phase transformation on vectors. However, a $U(1)$ phase transformation on operators is not necessarily a phase transformation on states.