Let $x\in X$ and $A$ the connected component of $x$.
How do I show that $\pi_1(X,x)\cong\pi_1(A,x)$?
What I thought:
If $A$ were the path component of $x$ it would be easier, since all loops in $X$ would be loops in $A$. Now that is not necessarily so.
Where can things go wrong?
Nowhere. Since the image of any path and any homotopy between paths has to be fully contained in a path component, then if $C$ is a path component of $a$ we get
$$\pi_1(Y, a)\simeq\pi_1(C, a)$$
for any subset $C\subseteq Y\subseteq X$.
So all that you have to realize is that the connected component of $a$ contains the path component of $a$.