Yes. Let $C$ be the closed complement of $U$, then by excision of $C$ we have $H_0(\mathbb{R}, \mathbb{R} - K) = H_0(U, U - K)$. What is more$H_1(\mathbb{R}, \mathbb{R} - K) = H_1(U, U - K)$; since $H_1(\mathbb{R})=0$, foryou also have in fact $A$$H_1(\mathbb{R}, \mathbb{R}-K)= H_1(U, U-K)= 0$ when $\mathbb{R}-K$ is connected and containing.
So $K$, the connectedness of$H_0(U-K)$ injects into $A - K$ is equivalent to$H_0(U)$ and $H_0(A, A-K) = 0$$U-K$ must be connected.