I was misremembering: The related questions here and here while address similar issues do not answer your question.
Connectedness of $X$: Since $X$ contains a dense connected subset $X'$, then $X$ itself is connected.
Hausdorfness of $X$: (a) Suppose first that $x_1, x_2\in X$ project to distinct points in $Y$. Then the existence of separating neighborhoods of $x_1, x_2$ follows from Hausdorfness of $Y$. (b) If $x_1, x_2$ project to the same point $y$ of $Y'$ then use the fact that $y$ has a neighborhood $U\subset Y'$ with preimage a disjoint union of open subsets on each of which $p$ is injective. (c) Lastly, if $y$ belongs to $S$, then (in view of the argument in (b)) the only interesting case is when $x_1, x_2$ belong to the closure of the same punctured disk in $X$ which maps onto a punctured neighborhood of $y$ in $Y$. But this case is clear as well since the disk in ${\mathbb C}$ is Hausdorff.
All this is just elementary general topology which Donaldson expects one to have mastered before reading his book.
- The uniqueness is a bit less obvious but not hard either. The key is Riemann's extension theorem: An isolated singularity $z_0$ of a meromorphic function is removable if the function is bounded in a punctured neighborhood of $z_0$.
Consider two "completions" of $X$:
$$
\begin{array}{ccccc}
& & X' & & \\
& \swarrow & & \searrow & \\
X_1 & & & & X_2 \end{array}$$
such that $p$ extends to proper maps $p_k: X_k\to Y, k=1,2$.
$$
\begin{array}{ccccc}
X_1 & \leftarrow & X' & \rightarrow & X_2 \\
\downarrow{p_1} & & \downarrow{p} & & \downarrow{p_2}\\
Y & \leftarrow & Y' & \rightarrow & Y \end{array}
$$
We need to construct a biholomorphic map $X_1\to X_2$ forming a commutative diagram:
$$
\begin{array}{ccccc}
& & X' & & \\
& \swarrow{i_1} & & \searrow{i_2} & \\
X_1 & & \longrightarrow & & X_2 \end{array}$$
We already have a biholomorphic map between dense subsets
$$
X_1\supset i_1(X')\stackrel{f}{\to} i_2(X')\subset X_2
$$
The subsets $R_k:= X_k- i_k(X')$ are discrete in $X_k$, $k=1,2$. Now, for each $x_1\in R_1$ there is a neighborhood $V_1$ of $x_1$ in $X_1$ which is disjoint from the rest of $R_1$. The image $W_2:=f(V_1-\{x_1\})\subset X_2$, by properness of $p_2$, forms a punctured neighborhood of a point $x_2\in R_2$. By shrinking $V_1$ if necessary, we can assume that $W_2$ lies in a coordinate neighborhood of $x_2$ (I just need to ensure that this larger neighborhood of $x_2$ in $X_2$ is biholomorphic to the unit disk). Thus, by Riemann's extension theorem, $f|V_1-\{x_1\}$ extends to a holomorphic map $V_1\to W_2\cup \{x_2\}$. Do this for every point in $R_1$. I will leave it to you to check that the resulting holomorphic extension $F: X_1\to X_2$ of $f$ is biholomorphic.
A similar argument also proves the following theorem:
Definition. Let $X$ be a Riemann surface. A conformal completion of $X$ is a holomorphic embedding $\iota: X\to \hat{X}$ to another Riemann surface, such that:
a. $\hat{X}- \iota(X)$ is a discrete subset $S\subset \hat X$.
b. For every properly embedded closed punctured disk $D\subset X$, the image $\iota(D)$ is a closed punctured neighborhood of some $s\in S$.
Theorem. Every Riemann surface admits a conformal completion. Such a completion is unique in the natural sense. Moreover, every holomorphic automorphism $X\to X$ extends to a holomorphic automorphism of the completion.