In $\;\Bbb R^n\;$ , open and connected gives us path connected. With this I think we can already begin. The details I'll let you to fill.
Take any point $\;a\in G\;$ , and now take a point $\;u\in A\;$ such that the straight line $\;r(t):=tu+(1-t)a\;,\;\;t\in[0,1]\;$ is wholly contained in $\;G\;$ . This is possible for any $\;u\in G\;$ if $\;G\;$ is convex, for example, and anyway it is always possible by means of a polygonal line which will be almost always differentiable. You will need to complete in this last case.
Let us define now
$$\;g(t):=f(r(t))\implies g'(t)=f'(r(t))\bullet r'(t)$$
But $\;f'(r(t))=\nabla (f(r(t))=\vec0\;$ since all the partial derivatives are zero, so the above dot (inner) product is zero, which means $\;g(t)=0\iff g(t)\;$ is a constant, and then
$$g(1)=f(r(1))=f(u)=f(a)=f(r(0))=g(0)\implies f(u)=f(a)$$