Yes, open sets are Borel sets by definition. $\mathcal{B}$ is the smallest $\sigma$-algebra that contains all open sets.
If $f:X \to Y$ is continuous, then $\mathcal{S} := \{A \subseteq Y : f^{-1}[A] \in \mathcal{B}_X\}$ is a $\sigma$-algebra on $Y$ that contains all open sets because $f$ is continuous, so $f^{-1}[O]$ is open in $X$ when $O$ is open in $Y$, so $f^{-1}[O]$ is in particular in $\mathcal{B}_X$, so $O \in \mathcal{S}$.
By minimality of the Borel sets, as defined in the first line, $\mathcal{B}_Y \subseteq \mathcal{S}$ which means exactly that the inverse image of a Borel set in $Y$ is a Borel set in $X$.
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$.
Best Answer
The answer is no. Endow both $\mathbb{R}^2$ and $\mathbb{R}$ with the usual Borel $\sigma$-algebra and let $\pi_1:\mathbb{R}^2\to\mathbb{R}$ be the projection onto the first coordinate. Now it is a well known fact that there exists Borel sets $B\subseteq\mathbb{R}^2$ such that $\pi_1(B)$ is not Borel. Now $B$ will be in general not open, but we can make it so. We just apply the following theorem (Lemma 4.58 in Alipranits & Border 2006):
Let $\mathcal{C}$ be a countable family of Borel subsets of a Polish space $(X, \tau)$. Then there is a Polish topology $\tau'\supseteq\tau$ on $X$ with the same Borel $\sigma$-algebra for which each set in $\mathcal{C}$ is both open and closed.
In particular, we can make $B$ open. Then $B$ is open and $\pi_1$ is a continuous surjection, but $\pi_1(B)$ not Borel. Since one can take $B$ in the original space to be bounded, the example works even when $Y$ is compact.