We have $v = \sqrt{2gh}$ where $g$ is acceleration due to gravity and $h$ is height.
By equating the rate of outflow to the rate of change of liquid in the tank, show that $h(t)$ satisfies the equation:
$A(h)(dh/dt) = -\alpha a \sqrt{2gh}$
where $A(h)$ is area of cross section of the tank at height $h$
$a$ is the area of the outlet
$\alpha$ is a contraction coefficient, for water it is about $0.6$.
Toricelli's equation can be derived from the equation of continuity:
$A_1 v_1 = A_2 v_2$
The area at the inlet (index 1) $A_1$ is the cross-section of the tank and the velocity at the inlet is given by the Change of the liquid height. At the outlet (index 2) the area is given by $A_2 = a$. The velocity at the outlet is proportional to the velocity that is derived by the equation $Energy = \frac{1}{2}mv^2=mgh$. You have to multiply $v$ with a contraction factor because the gravitational energy is converted non-ideally; there are losses in the efflux process.