Connecting a compact subset by a simple curve

Not always.

Let $K$ be a subset of an ambient space $V$ ($V=\mathbf{R}^2$ is fine, but doesn't matter) that is the closure of a discrete subset $D$, such that $K-D$ is homeomorphic to a segment. This exists in $\mathbf{R}^n$ for $n\ge 2$.

Then every closed subset of $V$ that meets every component of $K$ has to contain all $D$, and hence contains its closure, and hence contains $S$. But if $j:[0,1]\to C$ is an injection of a segment in a circle, the interior of $j([0,1])$ in $C$ is equal to exactly $j(\mathopen]0,1\mathclose[)$; in particular, $j([0,1])$ can't have empty interior in $C$.

But if $C$ were a circle within $V$ meeting every connected component of $K$, we would have $D\subset C$, hence $K\subset C$. Since $j(S)=S$ has empty interior in $K$ and $K\subset C$, it has empty interior in $C$. This is a contradiction with the above fact.

[Edit: I initially described $K$ as subset of the sine curve, but this doesn't matter and complicates the description.]


Minor variant: let $M$ be any compact subset with empty interior, which is not homeomorphic to any subset of a circle (e.g., the whole sine example in the plane, a sphere in a higher space). Let $D$ a discrete subset of $\mathbf{R}^n$ whose set of accumulation points is exactly $M$ (this exists). Then no subset of $\mathbf{R}^n$ homeomorphic to $C$ meets every component of the compact subset $K=D\cup M$.