These days they can call the location of an asteroid in interplanetary space to within a few miles decades in advance. There's just not enough acting on them to make that anything other than incredibly predictable.
That said, every planet - actually, every object out there - has a "gravitational keyhole." The size, location, etc., of the keyhole depends on a lot of things, the main one being the mass of both objects (or just the Earth's in this case, as any meteor is irrelevant by comparison). If something hits the keyhole, and the keyhole can be very, very small, it will be deflected enough to hit the planet either now or in a subsequent pass.
Most of the uncertainty in asteroid prediction is in weather they're going to bulllseye that very specific location. There's a lot of precision involved there; Apophis' keyhole is less than a kilometer in diameter, for instance, which translates to only a few hundred feet wider than the asteroid itself. If something misses the keyhole, 27,000km might as well be 27,000,000km.
And asteroids have gotten very close indeed at times - they can actually bounce off the atmosphere without impacting if they come in at a shallow enough angle (e.g., missing the planet by hundreds of kilometers instead of tens of thousands).