Comet Halley. Public domain by NASA.
There are some biologists who think a meteor killed the dinosaurs, one that left the Gulf of Mexico as crater. Beyond the immediate impact, such a meteor would leave vast clouds of dust that could block out the sun for months, much as a much smaller explosion created a cloud that blocked out the sun for a couple weeks in Washington State when Mount Saint Helens erupted. There is also the minor potential for the formation of dangerous liquids, solids and gases that could cause everything from minor respiratory problems to infertility in large sections of the earths soil to poison humanity, and viruses or bacteria if such a meteor were to come from an extraterrestrial body that had life. In addition, an exceptionally large meteor could invert the crust, melting away at 2000 degrees Fahrenheit all present traces of life on this earth, or reverse the poles, making Earth temporarily susceptible to super powered radiation from the sun, possibly destroying all of humanity in an instant.
This is hardly the only lethal hazard humanity could encounter. A supervirus, such as an airborne form of HIV, could kill of vast numbers of our species in a short time, and similar airborne viruses where no existing human gene could provide a reasonable defense could easily wipe humanity off the face of the earth.
Nuclear War is every bit as present today as it was in 1961 as a major threat to life on this planet. In addition to the obvious hazard of a purposeful nuclear war, an accidental launch, especially from less developed nuclear nations such as India, or a nuclear theft, especially from Pakistan or Russia, could trigger a series of events leading to a mass death throughout this earth, and potentially (though I will not take the time to verify or deny this claim) Nuclear Winter.
A large World Government could attempt mind control or even just more traditional totalitarianism or absolutism, leading to a century of war, mass killing, and insurgency throughout this planet, or a thousand years of horrifying submission, kleptocracy, and degradation, and likely genocide. The two are highly connected, as Indochina (Cambodia, Vietnam, Laos) and Africa have been clear examples of both.
What do we do about these supreme dangers? If any of these dangers is to be handled effectively, humanely and justly, planning must occur in advance, preferably with clear rush buy instructions to build what is necessary to handle them overnight or sooner, even at high cost. Methods must be developed to deal with these problems as they come up, and any tool required needs to be buildable in a short amount of time, as it is financially unreasonable and politically untenable to keep such things stockpiled for when they are needed. Sooner or later, one of these, or possibly all of these, will happen.
Theoretically, there are telescopes that could tell us to a high degree of certainty whether or not a meteors trajectory would take it to Earth. They could also (of course) tell us the meteors size, and possibly allow us to deduce what it is composed of. With a relatively small number (around a dozen, 2 each 8-hour-shift) of men in a single office, we could analyze the sky. If the meteors are detected far enough away, we could easily have several decades of warning time to develop a plan to neutralize the hazard.
Research labs and embargo plans could help fight the danger of a supervirus. First, by cutting contact, we could isolate the community where the virus is occurring, while using airlifts to ship in vital supplies. Second, through not only good medications, but good theoretical processes to develop a medication quickly for any ailment based upon the chemical composition of the cell, we could develop medicines, possibly even cures quickly. Third, developing a larger base of antibiotics makes the likelihood of a bacteria resistant to all drugs less, but the private sector is unlikely to develop something with such a low revenue margin, as antibiotics are very cheap. Public sector, university funding could be utilized to develop such instead, avoiding the hazards of a reactionary market for this particular need.
As for Nuclear War, an ABM (Antiballistic Missile) system could deal with minor launches and be used as a first resort, leaving MAD, the destruction of humanity with nuclear weapons, as a last. Such a system could be developed using Supersonic SAMs, Lasers, or some combination of both, but would need to destroy the ICBM's at a sufficient safe distance, even if normally able to disarm the missile.
So how do we handle the world government? You've probably heard this many times, but the best guarantee for a democratic (or otherwise regulated) government is a free society, and the best way to enable such a free society is through the private ownership of firearms allowing a final safegaurd before totalitarianism becomes entrenched. Not only does this make the ultimate control of a central power less likely, but enables the population to fight quickly, shortening the time that a civil war against such an authority must last. Allowing citizens to defend themselves with firearms not only helps lower crime, but also keeps the population ready and militant for such an event.
All these measures (including the right of gun ownership) require planning and forethought. Some of them require government (or private organization) intervention for domestic security, and one of these requires government to stay out.