Why shut off the water when the grid goes down? The spring water has to go away anyhow. It's not like you're saving stored water behind a dam, giving you an advantage to holding it unless needed. An automated valve and its controls (which would have to work during power problems) are extra cost and extra failure points - and grid failure is rare. So you'd like to avoid the device (and depending on it for safety) if you can.
You can let the motor spin at 2x normal RPM until the grid comes back and let the un-decelerated water spray around a bit as it leaves the mill with most if its momentum intact. (You'll want to have something like a pebble bed to keep it from eroding the tailrace.)
The motor won't generate significantly, even if spinning, unless the grid island has a significantly capacitive power factor - which is unusual. But if it does it would be enough to electrocute linemen. So if you're grid-tied you should have a frequency-selective relay driving a cutout contactor, just in case (and to satisfy the power company).
The contactor would be line-side powered so it would pull in as soon as the line comes back and stabilizes. Turning on the excitation when the motor is spinning near 2x will produce a generation surge roughly equivalent to the startup surge of a motor driving a pump - just feeding power the other way. You dump the slowdown inertia of the rotor and the generation picks up as the rotor slows from 2x to 1x, a mirror image of a motor starting from stall with a pump load. So the contactor should be happy with the current surge.
You won't need anything special if you're fed by a 3-phase line.
(Not sure if you need "start" excitation for a single-phase feed to make the motor do the right thing if it happens to be spinning over 1.5x or near 2x the synchronous RPM when the contactor closes. Note that if you're using a run cap on the third phase with a single-phase feed you may be providing enough capacitance to keep it generating if the grid islands - which would be a problem both if you don't have a cutout and when your cutout closes on grid restoration unless the cutout also unhooks the cap.)