Astronomers have detected a small asteroid/giant meteor coming sorta close to Earth tonight. Sorta close is like 8 times the distance to the moon, which isn't really all that close. The object is a thousand meters across, which would make one heluva hole if it were to hit the Earth.
Then Fox dove off into magic, far beyond even the science of Star Trek. In the future, with enough funding, we could send a space craft to intercept (there have been movies, Armageddon, Bruce Willis, about this) and use the space craft's GRAVITY to deflect the rock. Not a chance. We have a space going rock the size of a small mountain. The gravitational pull between even a monster spacecraft, one the size of an aircraft carrier, and a mountain sized rock, would be a matter of ounces. A hundred ounces of pull ain't gonna move a mountain sized rock. Not ever.
Possible, even with today's technology, would be to place a large fusion bomb to one side. Detonate it, and I guarantee you that sucker will move. If it doesn't move enough, set off more nukes. Or, if the rock is not very strong, the bomb will blow it into gravel.
So far so good. There is one bad outcome. The bomb blows a huge rock, say a 10 mile rock, into dozens of one mile fragments. In that case, best have more nukes available to deal with each of the fragments.
For this to work, we have to build the necessary rockets, and bombs, and keep them on standby, ready to launch on maybe a day's warning. That will cost serious money.