By September 1915, after five costly months, it was obvious to the Allies that the Gallipoli Campaign had ground to a halt, just like the Western Front. The generals decided to evacuate. However this could have been very dangerous: the Turks knew that if the Allies got away they could regroup and attack again. Also the sight of an enemy retreating encourages an army to chase and attack. By December 1915 the Allies were ready to go. In just three weeks 150,000 troops together with artillery, stores, and thousands of mules and horses were loaded onto ships at night and taken to safety. They managed to deceive the Turks, and not a single soldier was killed. It turned out to be the most successful part of the whole Campaign.
Here, Gallipoli historian Stephen Chambers describes how it was done.