If $M$ is finite dimensional, then $M$ is closed. We'll prove this by inducting on dimension.
It's obviously true for zero dimensional subspaces.
For the inductive step, we'll use the following proposition, suggested by Moya:
If $M$ is any closed subspace of $X$, then for $x \notin M$, the subspace $M \oplus \mathbb{R}x$ is closed.
To prove this, suppose that $y_n = x_n+c_nx$ is a sequence of points of $M \oplus \mathbb{R}x$ which converges to a point $y \in X$. Here $x_n \in M$ and $c_n \in \mathbb{R}$. We need to prove that $y \in M \oplus \mathbb{R}x$ to prove that $M \oplus \mathbb{R}x$ is closed. To prove this, use Hahn-Banach to find a bounded linear functional on $X$ such that $f|_M=0$ and $f(x) =k\neq 0$. Since $y_n$ converges in $X$, we know that $(y_n)$ is a Cauchy sequence in $X$, so by boundedness $f(y_n)=kc_nx$ is a Cauchy sequence in $X$. Thus $c_n$ is a Cauchy sequence in $\mathbb{R}$, so it converges to some $c \in \mathbb{R}$. Then $c_nx $ converges to $ cx \in X$, so $x_n=y-c_nx$ converges to $y-cx$. But $M$ is closed and $x_n \in M$, so $y-cx \in M$. It follows that $y=y-cx+cx \in M \oplus \mathbb{R}x$.