Gauge transformations allowed by physical theories form groups. For example, a wave function in quantum mechanics can be multiplies by $e^{i\theta}$ and this won't change a thing. So the gauge group of this theory is $U(1)$.
Now, the Maxwell equations can be written in terms of a scalar $\phi$ and a vector potential $\vec{A}$ (I don't write them here since they are very well known). They admit gauge transformations in which $\vec{A}\to\vec{A}+\vec{\nabla} f$ and $\phi\to\phi+\partial_t f$ (up to some factors), where $f(\vec{r},t)$ can be any differentiable function.
Since I can take any function, I conclude that the gauge group of electromagnetism is infinite-dimensional. Is this correct?