United Earth

United Earth is the name of the planetary nation-state created through the unification of Earth in the 22nd century following First Contact in 2063. United Earth later continued to exist as a political subdivision of the United Federation of Planets when its government helped found that interstellar state in 2161. (Star Trek: First Contact, Star Trek: Enterprise)

History
A forerunner of the United Earth Government was the European Hegemony which existed in the 2120s. (TNG: "Up the Long Ladder")

The last of Earth's early nations became a part of United Earth in 2150. (TNG: "Attached")

Many nation-states and confederations retained their individual identities however. The European Alliance, African Confederation, United States and others continued to exist into the 24th century and beyond. (TNG: "The Price", "Conundrum"; VOY: "Imperfection")

The United Earth operated a department known as the United Earth Diplomatic Corps. They were the agency responsible for running (at least) the United Earth Embassy on Vulcan during the 22nd century. (ENT: "The Forge")

Origins
According to the The official Star Trek-website, the year 2113 may be time that the United Earth came into being, however, this fact has never made it into the canon. The date is cited to Star Trek: First Contact by some sources, but except for Deanna speaking of "poverty, disease, war" being gone in 50 years there is no line in the movie suggesting a unification.

It is a common misbelief that Australia was the last nation-state to join the United Earth Government. However close scrutiny of the particular line in the episode "Attached" does not support that claim. It is, however, possible that the United Earth government was founded prior to 2150 and that this was the year that the last remaining independent nations, including Australia, chose to join. This is supported by various episodes of Star Trek: Enterprise, such as "First Flight", which established that the United Earth Starfleet existed in the 2130s and 2140s.

Structure
The exact structure of the United Earth Government is unknown. Nathan Samuels, an Earth diplomat who appeared in two episodes of Star Trek: Enterprise, was referred to as a minister, suggesting that Earth may have a parliamentary system of government. It's also been speculated that the leader of Earth would be a prime minister, perhaps Samuels himself, though nothing has been confirmed.

Longevity
Presumably, the United Earth Government at the time of Star Trek: Enterprise, which was responsible for the Earth Starfleet, remained in place following the founding of the United Federation of Planets. The 23rd century existence of a United Earth Space Probe Agency in TOS Season 1 indicates this name persists, perhaps referring to the world government even after it joins the UFP.