Answer
$2.61 \times 10^4 \, \mathrm{Nm}$
Work Step by Step
With the origin at the hinge, I'll call the total height of the gate $H$, the vertical distance from the origin $h$ and the width of the gate $l$. I'll start out by finding the force $dF_1$ acting on the upper part of the gate. With positive $y$-direction up:
$$ p = \frac{dF_1}{dA} = \rho h\big(\tfrac{H}{2} - h\big) \Rightarrow dF_1 = \rho gl\big(\tfrac{H}{2} - h\big)dh $$
Now to find the torque $d\tau_1$ acting on this strip:
$$ d\tau_1 = h \times dF_1 = \rho gl\big(\tfrac{H}{2}h - h^2\big)dh $$
Integrating from $h=0$ to $h=\tfrac{H}{2}$ to find the total torque $\tau_1$ acting on the upper part of the gate:
$$ \tau_1 = \rho gl \int_0^{H/2} \big(\tfrac{H}{2}h - h^2\big)\, \mathrm{d}h = \rho gl \frac{H^3}{48} $$
I'll find the force and torque acting on the lower part of the gate using the same procedure and positive $y$-direction down:
$$ dF_2 = \rho gl\big(\tfrac{H}{2} + h\big)dh $$
$$ d\tau_2 = \rho gl\big(\tfrac{H}{2}h + h^2\big)dh$$
$$ \tau_2 = \rho gl \frac{5H^3}{48} $$
These to torques are opposite, the total torque is the difference:
$$ \Sigma \tau = \tau_2 - \tau_1 = \rho gl \frac{H^3}{12} =$$
$$ (1.00 \times 10^3 \, \mathrm{kg/m^3})(9.80 \, \mathrm{m/s^2})(4.00 \, \mathrm{m})\frac{(2.00 \, \mathrm{m})^3}{12} = 2.61 \times 10^4 \, \mathrm{Nm} $$
This net torque is of course acting on the lower part of the gate, since the pressure due to the water is higher there.