First, note that the EOM are the Euler-Lagrange equations:
$$ \frac{\delta S}{\delta \phi}=\partial_\mu\left(\frac{\partial \mathscr L}{\partial\phi_{,\mu}}\right)-\frac{\partial \mathscr L}{\partial \phi}=\dot\pi+\partial_i\left(\frac{\partial \mathscr L}{\partial\phi_{,i}}\right)-\frac{\partial \mathscr L}{\partial \phi} $$ where I isolated the $\mu=0$ term, and used the definition of $\pi$.
Next, use $\mathscr L=\pi\dot\phi-\mathscr H$: $$ \frac{\delta S}{\delta \phi}=\dot\pi+\partial_i\left(\frac{\partial \mathscr L}{\partial\phi_{,i}}\right)-\frac{\partial \mathscr L}{\partial \phi}=\dot\pi-\partial_i\left(\frac{\partial \mathscr H}{\partial\phi_{,i}}\right)+\frac{\partial \mathscr H}{\partial \phi}=\dot\pi+\frac{\delta H}{\delta \phi} $$ because $\pi$ and $\dot\phi$ are not functions of $\phi$.
Thus, we get $\dot\pi=-\frac{\delta H}{\delta\phi}=\{H,\pi\}$.
The other relation is easier: $$ \{H,\phi\}=\frac{\delta \mathscr H}{\delta \pi} $$ Next, use $\mathscr H=\pi\dot\phi-\mathscr L$: $$ \{H,\phi\}=\frac{\delta \mathscr H}{\delta \pi}=\dot\phi $$ because $\mathscr L$ is not a function of $\pi$.
ADDENDUM
Let $f(\phi,\pi)$ and $g(\phi,\pi)$ be two function on "Phase space". Then, by definition, $$ \{f(\boldsymbol x),g(\boldsymbol y)\}\equiv\int\mathrm d\boldsymbol z\ \frac{\delta f(\boldsymbol x)}{\delta \phi(\boldsymbol z)}\frac{\delta g(\boldsymbol y)}{\delta \pi(\boldsymbol z)}-\frac{\delta g(\boldsymbol y)}{\delta \phi(\boldsymbol z)}\frac{\delta f(\boldsymbol x)}{\delta \pi(\boldsymbol z)} $$ where everything is evaluated at the same time $t$ (not writen for clarity). This means that $$ \{H(t),\pi(t,\boldsymbol x)\}=\int\mathrm d\boldsymbol z\ \frac{\delta H(t)}{\delta \phi(\boldsymbol z)}\frac{\delta \pi(\boldsymbol x)}{\delta \pi(\boldsymbol z)}-\frac{\delta \pi(\boldsymbol x)}{\delta \phi(\boldsymbol z)}\frac{\delta H(t)}{\delta \pi(\boldsymbol z)}=\int\mathrm d\boldsymbol z\ \frac{\delta H(t)}{\delta \phi(\boldsymbol z)}\delta(\boldsymbol x-\boldsymbol z) $$ which equals $\frac{\delta H}{\delta \phi}$, as expected.
ADDENDUM II
Proof of $\frac{\delta H}{\delta \phi}=\frac{\partial \mathscr H}{\partial \phi}-\partial_i\left(\frac{\partial\mathscr H}{\partial\phi_{,i}}\right)$:
The dynamical variables of the Lagrangian are $\phi$ and $\partial_\mu\phi$. In the Hamiltonian formulation, we change $\partial_0\phi\leftrightarrow\pi$, so that the dynamical variables of the Hamiltonian are $\phi,\,\partial_i\phi$ and $\pi$.
With this in mind, the Hamiltonian is, by definition, $$ H=\int\mathrm d\boldsymbol x\ \mathscr H(\phi(\boldsymbol x),\phi_{,i}(\boldsymbol x),\pi(\boldsymbol x)) $$
Therefore, $$ \delta H=\int\mathrm d\boldsymbol x\ \delta\mathscr H(\phi(\boldsymbol x),\phi_{,i}(\boldsymbol x),\pi(\boldsymbol x)) $$ where $$ \delta\mathscr H(\phi,\phi_{,i},\pi)=\frac{\partial \mathscr H}{\partial \phi}\delta\phi+\frac{\partial \mathscr H}{\partial \phi_{,i}}\delta\phi_{,i}+\frac{\partial \mathscr H}{\partial\pi}\delta\pi $$
Next, as we want $\frac{\delta H}{\delta \phi}$, we want to leave $\pi$ unchanged, so $\delta\pi=0$ (this is analogous to ordinary partial derivatives: when you calculate $\frac{\partial f(x,y)}{\partial x}$ you want to make a small displacement of $x$, while leaving $y$ unchanged)$\phantom{}^1$.
Anyway, in the integral over $\mathrm d\boldsymbol x$, we can integrate by parts the $\delta \phi_{,i}=\partial_i\delta \phi$ to make the derivative act on $\frac{\partial\mathscr H}{\partial\phi_{,i}}$:
$$ \delta\mathscr H(\phi,\phi_{,i},\pi)=\frac{\partial \mathscr H}{\partial \phi}\delta\phi-\partial_i\left(\frac{\partial \mathscr H}{\partial \phi_{,i}}\right)\delta\phi+\text{surface terms} $$
Finally, back to $H$: $$ \delta H=\int\mathrm d\boldsymbol x\ \left(\frac{\partial \mathscr H}{\partial \phi}-\partial_i\left(\frac{\partial \mathscr H}{\partial \phi_{,i}}\right)\right)\delta\phi $$ where I assumed that surface terms dont contribute. The expression in the parentheses is, by definition, the functional derivative of $H$ w.r.t. $\phi$.
$\phantom{}^1$: If we took $\delta\pi\neq 0$ and $\delta\phi=0$, we would get $\frac{\delta H}{\delta \pi}$ instead. All this is possible because the system is unconstrained, which is not true in some theories (such as the Dirac Lagrangian); in these cases, you can't use Poisson brackets, but Dirac brackets instead.