This is true. And more. In a metric space being star-compact is equivalent to being compact.
- Proof. In Hausdorff spaces, star-compactness is equivalent to countable compactness. (See, for example, this question.) And in metric spaces countable compactness is equivalent to compactness.
For a more direct proof that star-compact subsets of $\mathbb R$ are closed, consider the following.
Suppose that $B \subseteq \mathbb R$ is not closed. Pick some $b \in \overline B \setminus B$. Then there is a monotone sequence $( b_n )_n$ in $B$ which converges to $b$. Without loss of generality we may assume the sequence is strictly increasing. Consider the collection $\mathcal U$ of open subsets of $\mathbb R$ consisting of the following sets:
- $( -\infty , b_1 )$,
- $( b_n , b_{n+2} )$ for all $n \in \mathbb N$,
- $( b , + \infty )$.
As $\bigcup \mathcal U = \mathbb R \setminus \{ b \}$, it follows that $\mathcal U$ covers $B$.
I claim that there is no finite $A \subseteq \mathbb R$ such that $B \subseteq \operatorname{st} ( A , \mathcal U )$. For this note that no finite subcollection of $\mathcal U$ covers $A$, since each set in $\mathcal U$ contains at most one $b_n$. Also, each $x \in \mathbb R$ is contained in only finitely many (in fact, at most two) sets in $\mathcal U$. Thus for every finite $A \subseteq \mathbb R$ the set $\operatorname{st} ( A , \mathcal U )$ is a finite union of sets in $\mathcal U$, and therefore cannot cover $B$.