Gauge invariance is simply a redundancy in the description of a physical system. I.e. we can choose from an infinite number of vector potentials in E&M
For example, an infinite number of vector potentials can describe electromagnetism by the transformation below
$$A(x) \to A_\mu(x) + \partial_\mu \alpha(x)$$
Choosing a specific gauge (gauge fixing) can make solving a physical problem much easier than it would be if you did not fix a gauge.
Normally one chooses the Coulomb gauge: $\nabla \cdot A = 0$.
But there exist other guage choices that make life more or less easier depending on the physical system youre studying