In general a "World Government" and how well it does or does not work in fiction is highly dependent on the direction the originator WANTS it to go and why (as Scott notes
) details tend to be lacking when it's "good" and usually detailed down to that "horrible first step on the slippery slope to doom" when it's bad
Reality being a lot more messy than fiction it's quite obviously never going to be that black-or-white. The Andersonverse "World Government" like most back then were semi-extrapolated as following the post-WWII trend of "up-sizing" alliances towards larger and larger organizations. The problem with those remains the same, you need someone who is NOT part of the bigger group as an 'enemy' or focus which the World Government is organized to oppose in the same manner you had the whole "East-v-West" Cold War world "organization". (In theory, in reality it was never that solid of blocks on either side)
In most of these cases the "World Government" comes about from some trauma that "brings the world together" to solve but as always fiction points out that in and of itself might not be such a cozy outcome. In general, for example the Cold War situation above, something that brings the existing power structures into any kind of cooperative agreement if most likely going to be based on maintaning the status-quo as well as solving the original problem. For example the Niven/Pounelle "Co-Dominum" of the mainly US and Soviet governments binding themselves together by treaty and organization is a good example. (Well "bad" actually as it was a horrible idea that barely worked WHEN it worked at all but you know what I mean) I have my doubts you could plausibly every get there from any possible POD short of world ending destruction in the near future which is why I postulate an incoming asteroid as a possible cause. But in the end the whole point of the "organization" is to leave the US and USSR as 'top dogs' with everyone else arrayed below them in a structured hiearchy which by it's original and evolove nature, (as we see in the series) would become generally oppresive and eventually fall apart.
In reality of course organizations of the size needed for an actual "World Government"as Scott also note would not represent everyone so there is inevitible conflict built in along with method and motive to supress that conflict in both subtle and overt manners. Larry Niven's "UN" world government in his Known Space series of stories tends to waffle back and forth between neccissary evil and opressive evil with a pretty plausible rationale since it is organized around the high profile bugaboos of the 60s and 70s pollution, resource depletion and overpopulation. Technology wise that means it HAS to support some advances in technology, (fusion power, spaceflight and colonization) while rather ruthlessly supressing others to keep the lid on Earth's population.
Of course the Kziniti put paid to their planning to create a more passive and 'controllable' humanity just in time
In Star Trek, despite what Rodenberry had originally planned the questions of how 'unified' the United Federation of Planets and how, and what, the World Government "United Earth" was in that context and on its own. The rather heavy western bias' shows through pretty clearly for the UFP and frankly UE is never really brought up or examined which I think is a shame since one thing I'd always noted is Kirk was from Iowa. NOT the United States, and while he was aware of America his idenity seemed more tied to a specific place rather than a nation-state. I also think that the title "United Earth" points to a lack of "nation-states" as a basis for organization but that may be just me
I rationalize this by assuming that the Star Trek universe IS actually our universe and the "more advanced" humanoid species, ("Q" Trelaine, et-al) are actually "us" as a post-human society trying to recreate a favorite "fan-fiction" series... Now THERE's a scary thought
Randy