I'll start by generalizing to an arbitrary topological space $X$, with a view toward setting $X=\Bbb R^n$:
$(1)$ If $E\subseteq X$ is disconnected, then there exist disjoint open sets $G_1,G_2$ such that $E\subseteq G_1\cup G_2$, $G_1\cap E\ne\emptyset$, and $G_2\cap E\ne\emptyset$.
Treated as a property of topologies, there is a closely related formulation which specifies the disconnection:
$(2)$ If $E=A\cup B$ is a disconnection of $E\subseteq X$, then there exist disjoint open sets $G_1,G_2$ such that $A\subseteq G_1$ and $B\subseteq G_2$.
Obviously $(2)\to(1)$, and if $A$ and $B$ are connected, then $(1)$ and $(2)$ are equivalent (because the disconnection is uniquely determined). It is not clear to me if $(1)\to(2)$ in general, but the most natural approach to proving $(1)$ in fact attempts to prove $(2)$ since the alternative would require finding some other disconnection in $E$ (i.e. $E$ is actually in three or more "pieces").
By definition, since $E$ is not connected, there exist $A,B\subseteq E$ such that $A,B$ are open in $E$, nonempty and disjoint, and $A\cup B=E$. By the definition of openness in $E$, there exist open $G_1,G_2$ such that $A=G_1\cap E$ and $B=G_2\cap E$. Then clearly $G_1\cap E\ne\emptyset$ and $G_2\cap E\ne\emptyset$, and $G_1\cup G_2\supseteq A\cup B=E$. But we don't know that $G_1$ and $G_2$ are disjoint; instead we only get that $G_1\cap G_2\cap E=\emptyset$.
For $X$ a metric space, $(2)$ and hence $(1)$ are true (which answers your question in the positive). Let $x\in G_1$ when $d(x,A)<d(x,B)$ and $x\in G_2$ when $d(x,A)>d(x,B)$. These are both open sets, disjoint, and since there is an open set containing $A$ and disjoint from $B$, this implies that $d(x,B)>0$ when $x\in A$, so $A\subseteq G_1$ and similarly $B\subseteq G_2$.
For general topologies $X$, without weakening the disjointness condition to $G_1\cap G_2\subseteq X\setminus E$, $(1)$ is false. Consider $X=\{a,b,c\}$ with open sets $\emptyset,\{a\},\{a,b\},\{a,c\},\{a,b,c\}$, and let $E=\{b,c\}$. Then the sets $\{b\},\{c\}$ form a separation of $E$, so $E$ is disconnected. But no such $G_1,G_2$ exist; the obvious candidate is $G_1=\{a,b\},G_2=\{a,c\}$ but these are not disjoint.