How Apollo 11 almost got stuck on the Moon

In 1961, President Kennedy set the United States a two-part challenge that charged the country with a) landing a man on the Moon before the end of the decade and b) returning him safely to Earth. While Apollo 11 successfully achieved the first part of that challenge when it touched down in the Sea of Tranquility in July 1969, what is less known is how close it came to failing to achieve the second part.