TITLE: Is the image of a $G_\delta$ set under a continuous mapping of $\mathbb R^n$ a Borel set?
QUESTION [6 upvotes]: If $A\subset \mathbb R^n$ is a $G_\delta$ set and $f\colon \mathbb R^n\to \mathbb R^n$ is continuous, does it follow that $f(A)$ is a Borel set?
It is well-known that the image of a Borel set in $\mathbb R^n$ under a continuous map (even a projection) need not be Borel in general. However, for low levels of the Borel hierarchy the situation might be different: if $A\subset \mathbb R^n$ is $F_\sigma$, then (by writing $A$ as a countable union of compact sets) one finds that $f(A)$ is also $F_\sigma$, hence Borel. The image of a $G_\delta$ set need not be $G_\delta$ (e.g., take a piecewise linear function  such that $f(\mathbb{N})=\mathbb{Q}$) but I did not find any discussion of whether it must be Borel. The discussion in Continuous images of open sets are Borel? involves spaces that are not $\sigma$-compact.

REPLY [2 votes]: Here, I tried to write the answer as explicit as possible. In fact, Noah Schweber already mentioned Lusin's example of analytic non-Borel set in the deleted answer. Also, Gio67 mentioned the Descriptive Set Theory notes. Thus, the answer is already there in Gio67's answer. I tried explaining the parts not covered by those answers.
Lemma

The set $\mathbb{N}^{\mathbb{N}}$ of sequences of natural numbers is homeomorphic to the set of irrational numbers $I$ in $[0,1]$.

This is by continued frantion expansion of irrational numbers.
Definition

Denote by $E$ the set of irrational numbers $\alpha\in [0,1]$ with the continued fraction expansion $[0;a_1,a_2,a_3\ldots]$ such that there exists a subsequence $\{n_k\}\subseteq \mathbb{N}$ with
  $$a_{n_k}|a_{n_{k+1}} \ \mathrm{for} \ k\geq 1. $$

Theorem

There is a surjective continuous function from $\mathbb{N}^{\mathbb{N}}$ to $E$.

Proof.
Let $\{x_n\}\in \mathbb{N}^{\mathbb{N}}$. Construct an increasing subsequence $\{n_k\}$ by using $\{x_{3k+1}\}$ as follows.
\begin{align*}
n_1&=x_1,\\
n_{k+1}&=n_k+x_{3k+1} \ \mathrm{for}\  k\geq 1.
\end{align*}
Then we place the numbers from $\{x_{3k+2}\}$ in the following way.
\begin{align*}
a_{n_1}&=x_2,\\
a_{n_{k+1}}&=a_{n_k}x_{3k+2}\ \mathrm{for}\  k\geq 1.
\end{align*}
Enumerate remaining numbers $\mathbb{N}-\{n_k\}=\{m_k\}$ in increasing order. Then use $\{x_{3k}\}$ to fill up these partial quotients.
$$
a_{m_k}=x_{3k}\ \mathrm{for}\  k\geq 1.
$$
Then define $f(\{x_n\})=[0;a_1,a_2,a_3,\ldots]$.
Now, we have an answer to the question.

There is a $G_{\delta}$ subset $A$ of $[0,1]$ such that there is a continuous function $f:[0,1]\rightarrow [0,1]$ with $f(A)=E$.

Proof.
Consider the following composition.
$$
g:I\rightarrow \mathbb{N}^{\mathbb{N}}\rightarrow E.
$$
Then $G=\mathrm{Graph}(g)=\{(x,g(x))|x\in I\}$ forms a closed subset of a $G_{\delta}$ set $I\times [0,1]$. Then $G$ itself is a $G_{\delta}$ subset of $[0,1]^2$. Then the projection $\pi_2$ onto the second coordinate yields $\pi_2(G)=E$. 
Let $\Phi:[0,1]\rightarrow [0,1]^2$ be the continuous space-filling curve. Then take the $G_{\delta}$ set $A=\Phi^{-1}(G)\subset [0,1]$. This gives $f(A)=E$ where $f=\pi_2\circ \Phi$.