Florence was out of danger due to the "decisive" role of a key floodgate that prevented the Arno river from bursting its banks after heavy rains, Italian authorities said.