The rod can support the ball by pushing upwards on it when it is at the top, and also by pulling when the ball is at the bottom. The string, on the other hand, can only pull along its length, not push. So with the string the ball has to move fast enough that no pushing up is required from the string when the ball is at the top, but this is not true in the case of the rod.
At the top of a circular trajectory the ball momentarily moves in the horizontal direction while it accelerates downwards in the vertical direction. This downwards acceleration is provided by the combination of gravity and whatever force the string or the rod provides. Let's first consider the case of a string, when the ball is moving just slowly enough that the force from the string is zero when the ball is at the top of its trajectory. In this situation Newton's second law ("f=ma") reads
$$
mg = m a
$$
and for circular motion we always have
$$
a = v^2 / r
$$
so you get $v = \sqrt{gr}$. Obviously you already knew that, but now I will show the case where instead of a string one has a rod. In this case Newton's second law is
$$
mg - f_{\rm rod} = ma
$$
where $f_{\rm rod}$ is the force provided by the rod. In this case the ball can go around the circle at pretty much any speed, including zero, because one finds that the force provided by the rod can provide whatever amount of force is needed:
$$
f_{\rm rod} = m(g - a)
$$
so for $a \rightarrow 0$ we get $f_{\rm rod} \rightarrow mg$ and that is a perfectly viable solution.