Hampshire and Isle of Wight Fire Rescue Service were alerted to the Solent Hotel and Spa in Whiteley to deal with a “large-scale incident” at 8.44pm on Monday.
Guests needed help breathing after consuming the fumes and breathing apparatus was supplied by a Hazardous Area Response Team from South Central Ambulance Service (SCAS).
Children were among the number taken to hospital.
A fire service spokeswoman said: “A number of hotel guests had been overcome by fumes in the spa area after two chemicals had accidentally been mixed together and created chlorine gas.
“Hampshire and Isle of Wight Fire and Rescue Service began immediate emergency care, set up a casualty handling area and requested the ambulance service to attend.
“A ventilation fan was used to clear the fumes and firefighters took the vessel containing chemicals to fresh air. Gas monitors were used to check that the scene was safe.
“In total, 24 people were taken to hospital by ambulance crews.”
Station manager Dave Graham said it was a “large-scale incident with multiple people requiring medical treatment for the inhalation of gas”.
Firefighters from Hightown, Fareham, Cosham, Portchester, St Mary’s and Romsey were on the scene.
The hotel’s general manager George French told the Standard: “We can confirm that a serious incident occurred within the Solent Hotel and Spa.
“The incident, which took place within the spa and fitness areas, was brought to our attention yesterday evening and the emergency services were contacted.
“We evacuated all guests from the hotel on the instruction of the fire service and have been cooperating with them throughout the night and continue to do so.
“Unfortunately, some of our guests who had been using the spa facilities yesterday evening were taken to hospital as a precautionary measure.
“Our main priority is our guests’ and team members’ health and wellbeing and we will share further information as soon as it becomes available.
“This incident is under investigation so we are unable to release specific details but Solent Hotel is currently open and the spa and fitness facilities re-opened as normal at 8am this morning.”
SCAS said eight ambulance crews teamed up with its hazardous response team.
It said: “Twenty-four patients, ranging from children to those in their 50s, were assessed and treated by our ambulance teams for breathing difficulties.
“Following treatment at the scene by our crews those patients were taken to University Hospital Southampton for further assessment for those non-life threatening injuries.”