The curl of the gradient is the integral of the gradient round an infinitesimal loop which is the difference in value between the beginning of the path and the end of the path. In a scalar field there can be no difference, so the curl of the gradient is zero.