Firefighters, police and paramedics were called to the Feversham Arms Hotel, in Helmsley, Ryedale, at about 1pm today.
Crews found that the "accidental chemical spill" had produced gas, a spokesman for North Yorkshire Fire and Rescue Service said.
While it was contained, and there is no wider risk to the public, people were evacuated from the hotel and some neighbouring properties, he added.
However, in a new update, the fire service said crews have now managed to secure the leak.
The spokesman said: "Crews have managed to remove the chemicals and place them in a secure drum."