The most common reason for boiling, gurgling or bubbling noises in electric water heaters is lime build-up inside the tank. Over time, minerals dissolved in the water will precipitate out of the water and form hard scaly deposits on the heating elements. In a clean tank, water is able to flow freely around the elements, but the lime deposits trap water against the elements. The trapped water is overheated by the heating coils until it boils, creating the noise that you are hearing. This only happens when the elements are turned on, of course. The solution is to clean (or in sever cases, replace) the heating elements. As this requires some disassembly of the water heater, this task is usually left to a service person.
If the tank is very new (less than half a year old), the problem may also be related to water with a very high pH level. In this case, the water is reacting with the aluminum anode to create aluminum hydroxide gas. The solution is to replace the anode with a magnesium anode. This is a pretty rare condition, though, so I'd suggest trying lime removal first.