When a solenoid valve (also called an electric valve or automatic sprinkler valve) fails to close it is almost always because something is stuck inside it. This might be a grain of sand, a small twig, a insect, or even a tiny snail. To fix the valve you need to disassemble and clean...
Turn the water supply to your sprinkler system back on. The valve is fixed and will turn off unless your controller is currently giving it a supply of power.