How long ago did the Universe end? (Or, how much warning will we get when it does?) Only partly kidding...
Let's suppose that a thousand, or a million, years ago there was an explosion of some gigantic star (or other celestial object) that was strong enough to destroy Earth and Life As We Know It in this sector of the Universe.  But it happened a thousand, or a million, light years away, so the event has not yet come to our attention.
What would be the implications of this (beyond Stack Exchange being wiped out)?  Would humanity likely get a year's warning?  A hundred years?  (I won't ask what Humanity would do with the knowledge, because we all know it would make the stupidest decisions possible.)
 A: Fortunately, explosions tend to decay in intensity like $1/r^2$, so no known celestial events (e.g. supernovae) would really be able to do that. In any case, with these sorts of things, we could presumably see that such an event was "about to happen" and had simply not happened yet. 
There are actually some awesome doomsday cosmologies which are related to this idea, though! One of the best is the false vacuum decay event. This is the possibility that the zero-point energy of our vacuum is not the true minimum possible energy, but is instead separated by some barrier from a lower minimum. If the barrier is finite then eventually, quantum mechanics dictates that some part of space will tunnel through the barrier, relaxing to the lower energy state. As it decays, however, it makes it possible (definite, even) that nearby points of space will also decay. It turns out that this will lead to a bubble of death expanding at the speed of light. The laws of physics within this bubble are different from those of our laws and probably do not support the existence of atoms, so any particles that are hit by the wall of death just instantaneously dissolve. Since it expands at the speed of light, there is no actual way to see it coming with any possible experimental apparatus -- and of course you couldn't stop it even if you could detect it. Just one day, the wall of death passes through the solar system and everything goes bye-bye without any fanfare or even the slightest inkling that something is wrong. The best part about this: by looking at the mass of the recently-discovered Higgs boson you can find out whether this is possible, but the discovered mass is right on the threshold: we can't totally rule it out.
Your only real hope in such a scenario is that the many-worlds interpretation of quantum mechanics is correct. In that case, the only universes where you will continue to exist will be the ones where the wall of death has not yet hit Earth. These universes are vastly outnumbered by the ones where we are being destroyed by the wall of death, but fortunately we are not gods and therefore we don't have the global multiverse perspective needed to see this perpetually-ongoing destruction of the Earth.
A: A gamma-ray burst is rather more likely than false vacuum - we observe them on a regular (daily) basis. If one happens in our galaxy, and it's pointed at us, we had a good run.
The mechanics are fairly simple - massive star collapses, huge amount of energy squirts out in 2 directions, not affected by $1/r^2$ spherical expansion. Anything in the way gets microwaved. Things on the far side of the planet might survive the initial event, but the destruction of over half the ecosystem means they just might have enough time to document it for future settlers.
A: Why do you think there would be any warning at all?  There's not enough matter out there to propagate a blast wave, thus it pretty much has to be radiation.  Radiation that's traveling at virtually lightspeed (even intergalactic space isn't a perfect vacuum) and that we would sense by means of radiation traveling at the same speed.
Only something that propagates below lightspeed could possibly be sensed.  What would that be?
