Bowlish Infants School in Shepton Mallet was evacuated and homes and businesses in Croscombe were also deluged.
The River Sheppey in Croscombe burst its banks flooding a pub and nearby homes in the centre of the village.
The heavy rain also forced the A371 to be closed between Shepton Mallet and Wells.
The Environment Agency said a storm cloud passing over the Shepton Mallet area caused the flooding, when 30mm of rain fell in the space of 30 minutes.
Bowlish House Hotel owner Chris Ashleigh said: "The school informed us at about 10:15 that the fire service told them the river was about to burst its banks and there would be a lot of activity outside the hotel with parents collecting their children.
"Rather than have them out on the road we suggested they were brought inside.
"We've had about 60 to 70 children - they all sat down in the sitting room and dining room and they've all been very well behaved."
Somerset County Council sent a structural engineer to inspect a wall near the school which is holding back floodwater.  The school will remain closed on Thursday as a precaution.
A small section of the river wall in Croscombe was hammered down by a local resident to drain the water away.
Local resident, Peter Baron, said: "There was about two foot of water on the road and so some citizens turned up with their sledgehammers and bashed the wall down, a big water spout appeared and the road cleared quickly after that."
Devon and Somerset Fire and Rescue said heavy rainfall had also affected parts of Wookey, such as Church Street which was under 2ft (60cm) of water in places earlier.
A spokesman for the fire service said crews had attended several properties to pump out water and to clear debris from roads.
Earlier heavy rainfall left some roads in Wookey and Shepton Mallet, such as Cannards Grave Road in Shepton under water, but this has now cleared.
The head teacher of Bowlish Infants School said it would remain closed on Thursday.
People have been clearing up the debris left behind after flash floods struck the Mendips in Somerset earlier.