I have to strongly disagree, The LAST thing that will trigger global cooperation is a catastrophe. Instead, that will lead to war and Feudalistic division. Petty local leaders would blame XYZ in another part of the globe, and conspiracy theories would jump on board. Gene had it right, it would have to be inspiration, not desperation.
Or, world government could evolve over time, starting with treaties, like the one controlling the oceans, and expanding as people want them enforced.