Even for someone used to close shaves, this one was a bit close for comfort; it took all the Doctor’s strength to pull the Titanic’s nose up and send her back into space where she belongs.
A few more seconds and she might have ploughed right into Buckingham Palace, turning the whole of London into a smoking crater and potentially destroying the entire planet. That wouldn’t have been a good thing at all; the Doctor likes earth, and humans, and wiping them out would make a complete mess of the future. Humans are important, or will be.
Still, disaster averted.