Just take $A = X$, but NOT with metric $d$. Take $A = X$ with a metric $p$ that gives the product topology, like $p = \max d_i$ or $p = \sum d_i$. And take $f = \mathrm{id}: (X, p) \rightarrow (X, d)$.
Now, $\pi_i \circ \mathrm{id}: (X,p) \rightarrow X_i$ is certainly continuous, since $(X,p)$ has the product topology. So, you hypothesis imply that $f = \mathrm{id}$ is continuous.
To finish, you have to notice that (since we are in a metric space)
$$
\forall i,\,\pi_i(x_n) \rightarrow \pi_i(x)
\Leftrightarrow
x_n \xrightarrow{p} x
\Rightarrow
\mathrm{id}(x_n) \xrightarrow{d} \mathrm{id}(x)
\Leftrightarrow
x_n \xrightarrow{d} x,
$$
where the first "$\Leftrightarrow$" is due the product topology and the "$\Rightarrow$" is the continuity of $\mathrm{id}$.
Edit: Fixed according to comments. I had underestimated the OP... sorry! ;-)
Obs: Notice that the hypothesis does imply that $X$ has the product topology. For the proof above we only needed the "$\Leftarrow$" part of the hypothesis. The "$\Leftarrow$" implies that the topology of $(X,d)$ is weaker then the product topology. While the "$\Rightarrow$" part of the hypothesis implies that it is stronger.