In fact, if $A \subset (X,d)$ and $$O_n = \bigcup \{B(a, \frac{1}{n}): a \in A\}$$ then $$\bigcap_n O_n = \overline{A}\text{.}$$
To see this: suppose $x \in \overline{A}$, and let $n \in \mathbb{N}$. Then there is some $a \in A \cap B(x, \frac{1}{n}$ which means $x \in B(a, \frac{1}{n}) \subseteq O_n$. As this holds for all $n$, the inclusion from right to left has been shown.
If, on the other hand, $x \in \bigcap_n O_n$, let $r>0$ and pick $n$ large enough that $\frac{1}{n} < r$. Then $x \in O_n$ so for some $a \in A$, $x \in B(a, \frac{1}{n})$. Now, $a \in B(x, r) \cap A$ and as $r$ was arbitrary, $x \in \overline{A}$ showing the other inclusion.
In particular all closed sets $A$ in a metric space are a countable intersection of open sets (such spaces are called "perfect", and if they're also normal and $T_1$, as metric spaces are, they are called "perfectly normal" (or $T_6$)).
But metric spaces where all sets are a $G_\delta$ (i.e. a countable intersection of open sets) are rare.
Of course countable $T_1$ spaces $X$ in general work, because $$A = \bigcap \{ X\setminus \{x\}: x \notin A\}$$ is then a countable intersection of open sets for any $A \subseteq X$. In any-sized discrete space all subsets are already open. So these obey it.
There are also other (non-discrete, uncountable) spaces that obey it: the rational sequence topology on the reals, and Mrówka $\Psi$-space to name two famous examples.