Deleted
Since connectedness components are always both open and close sets, you need an example in which "connected" is not the same as "path connected". Let A be the line segment, in $\displaystyle R^2$, from (-1, 0) to (0,0) inclusive (so it is a closed set). Let B be the graph of y= sin(1/x) for $\displaystyle 0< x\le 1$. Let the topological space, X, be $\displaystyle A\cup B$. A and B are "path components" of X but B is neither open nor closed.