Let $X$ be a metric space such that given any two points $x,y\in X$ there exist a connected set $A$ such that $x,y\in A$. Then $X$ is connected.
My work: let us consider a continuous function $f:X\rightarrow\{+1,-1\}$. We need to show that $f$ is constant. Now let $x,y\in X$ then there exist a connected set $A$ such that $f(x)=f(y)$ for $x,y\in A$. Honestly I cannot proceed from here.
Don't be afraid to try things: Let $x,y\in X$ and let $A$ be a connected set with $x,y\in A$. Restrict $f\vert_A:A\to\{-1,+1\}$. This is continuous, but since $A$ is connected, $f\vert_A$ must be constant. Since $x,y\in A$, $f(x)=f(y)$. Since $x,y$ are arbitrary in $X$, $f:X\to\{-1,1\}$ is constant. Since any continuous function $X\to\{-1,1\}$ is constant, $X$ is connected.