The OP's headline question wants to know if a subspace of $\mathbb R^2$ is connected, but then in the detailed posts asks
... does pathwise connectedness implies connectedness?
But they also state
... I can join any two points of X by a path (line) which lies inside this set ...
Here we will solve the problem directly, in term of 'pure' point-set topology; it won't be necessary to use the concept of a function.
To define the topological product of two spaces we specify a 'cartesian product' base. For $\mathbb R^2$ it is not difficult to show that a different base can be chosen that generates the result - we can use open disks.
Exercise: Show that all lines and line segments (can be either open or closed at an endpoint) in $\mathbb R^2$ are connected.
Let $(L_\alpha)$ be the family of all lines passing through the point $(1,0)$. Let
$\tag 1 S_\alpha = L_\alpha \bigcap X$
It is easy to see that each $S_\alpha$ is a line ($x = 1$) or a line segment. Moreover,
$\tag 2 \bigcup S_\alpha =X$
and
$\tag 3 \bigcap S_\alpha = \{(1,0)\}$
But a well known result allows us to now conclude that $X$ is connected.