Let $ \pmb G $ be a vector field with domain $ U \subseteq \mathbb{R^2}. $
If $ U $ is not simply connected, but there exists a function $ f $ such that $ \pmb G = \pmb \nabla f \; \; \forall \; (x,y) \in U$, are we permitted to apply the gradient theorem (for paths that pass only through points which belong to $U$) ?
For example, $ \pmb G(x,y) = \Biggl( \cfrac{\partial}{\partial x} \biggl( \cfrac{x}{x^2+y^2} \biggr) , \cfrac{\partial}{\partial y} \biggl( \cfrac{x}{x^2+y^2} \biggr) \Biggr) \; , \; (x,y) \neq \pmb 0. $
We can see that $ U = \mathbb{R^2} \setminus \{\pmb 0\} $ is not simply connected, however it is true that $ \pmb G = \pmb \nabla f \; \; \forall \; (x,y) \neq \pmb 0 $ , where $ f(x,y)= \cfrac{x}{x^2+y^2} \; , \; (x,y) \neq \pmb 0 $.
So, can we use the gradient theorem in order to calculate line integrals $ \oint_c \pmb G \: d \pmb s $ for paths that do not pass through $ \pmb 0 $, ignoring the fact that the domain is not simply connected ?
Yes, the gradient theorem, also known as the fundamental theorem of calculus for line integrals, is true on any open domain, whether or not it is simply connected.
What the theorem says is
And so yes, the path integrals of $\pmb G$ are indeed independent of the choice of $c$.
What you might be confusing this with is the theorem which characterizes conservative vector fields, and which does need simple connectivity in its hypotheses: