Why are scattered sets G-delta?
There is a detailed proof here, a write-up by Dave L. Renfro It's quite elementary. Less elementary would be the route to show that all scattered sets in a separable metric space are essentially countable ordinal spaces, and then show that these are all completely metrizable, and conclude they must thus be a $G_\delta$ in a complete metric space (like $\mathbb{R}$).
As noticed above the proof by Dave L. Renfro is incorrect. However, it can be corrected and also much simplified.
In the proof of the Lemma let $\{B_1, B_2, \ldots\}$ be simply a countable subcover of the original cover of $U$. In the definition of $D_n$ replace also $(B_{n+1} + B_{n+2} + \ldots)$ by $U-(B_1+ B_2+\ldots +B_n)$ which is a $G_\delta$ set (it is the intersection of the open set $U$ with a closed set). Then each $D_n$ is also a $G_\delta$ set (now we know that each $XB_k$ is a $G_\delta$ set!) and it follows immediately that the intersection of all the $D_n$s is equal to $XU$, which is therefore a $G_\delta$ set.
I don't know if transfinite induction is elementary. But I thought I might have a writeup of this fun fact anyways.
Function $d: \mathcal{P}(\mathbb{R})\to \mathcal{P}(\mathbb{R})$ is defined recursively as follows: $d(X)=$ limit points of $X$; $d^{\alpha+1}(X)=d(d^\alpha(X))$; $d^{\alpha}(X)=\bigcap_{\beta<\alpha} d^\beta(X)$ when $\alpha$ is a limit.
Note when talking about limit points of $X$ we use the subspace topology on $X$.
We prove inductively on $\alpha<\omega_1$ the following:
$(\cdot)_\alpha: \forall X\subset \mathbb{R} \ \ X-d^\alpha(X)$ is $G_\delta$, and further more $ X-d^\alpha(X)$ can be written as $\bigcap_n U_n$ (nested/decreasing) such that $\bar{U}_n\cap d^\alpha(X)=\emptyset$.
It immediately follows that scattered sets are $G_\delta$.
Two cases.
Let $\alpha$ be a limit. Fix $\alpha_n, n\in \omega$ strictly increasing and converging to $\alpha$. By inductive hypothesis we could write $d^{\alpha_n}(X)-d^{\alpha_{n+1}}(X)=\bigcap_m U_m^n$ such that $\bar{U}_m^n \cap d^{\alpha_{n+1}}(X)=\emptyset$ (we apply $(\cdot)_{\alpha_{n+1}-\alpha_n}$ to $d^{\alpha_{n}}(X)$). Also we might assume that $U_m^j \cap U_m^k =\emptyset$ whenever $j<k$. The reason why we can do this is that given $j<k$, we know $\bigcap_m U_m^k = \bigcap_m U_m^k \cap d^{\alpha_k}(X)\subset \bigcap_m U_m^k \cap (\bigcup_{j<k} \bar{U}_m^j)^c \subset \bigcap_m U_m^k$, hence we might replace the set with the one inside if necessary.
Now we claim that $\bigcap_m \bigcup_n U_m^n=X-d^{\alpha}(X)$. One direction is easy to verify. We verify the other direction. Given $x\in \bigcap_m \bigcup_n U_m^n$, we know for $m=0$, there exists a least $k$ such that $x\in U_0^k$. We claim that $x\in \bigcap_m U_m^k$. Suppose not, let $m$ be the least such that $x\not \in U_m^k$. If $j<k$, by assumption, we know $x\not \in U_0^j$ hence $x\not \in U_m^j$. If $j>k$, as $U_0^j\cap U_0^k=\emptyset$, we know $x\not \in U_0^j$ so $x\not \in U_m^j$. But then this contradicts with the assumption.
Now successor, say $\alpha=\beta+1$. Let $\bigcap_m U_m$ be the result of applying $(\cdot)_\beta$. As $d^\beta(X)-d^{\beta+1}(X)$ consisting of isolated points in $d^\beta(X)$. Find $V_m$ open such that $\bar{V}_m \cap d^\beta(X)$ at at most one point, $\bar{V}_m \cap d^{\beta+1}(X)=\emptyset$ and $V_m\cap U_m =\emptyset$. The reason why this can be achieved is similar to the reason given above. Argue as before that the desired set is $\bigcap_m (V_m \cup U_m)$. Note that the inductive hypothesis is satisfied.