velikovsky writes , it was in the second millennium before the present era that the earth underwent one of the greatest catastrophes in its history a celestial body a new comet came very close to the earth , touching it with its gaseous tail .