When Worlds Collide (1951)
When a group of astronomers calculate a star is on a course to slam into Earth, a few days before, it's accompanying planet will first pass close enough to the Earth to cause havoc on land and sea. They set about building a rocket so a few selected individuals can escape to the planet.