The origin of the term "Third World" had nothing to do with a nation's economic development, or lack thereof. It was first used in 1952 by a French demographer, Alfred Sauvy. There was no analogous First World or Second World at the time, and he coined the phrase to map it to the "estates" into which historians used to divide the classes of society. The First Estate was the Church and the King (the monarch, ruling by Divine Right, was classified as a religious authority), the Second Estate was the nobility, and the Third Estate, roughly, was everyone else, from land-tied peons to wealthy merchant/traders. The term "Fourth Estate" to refer to the press didn't gain general usage until the 19th century.
When Sauvy first used the phrase "Third World," historians, sociologists and demographers generally thought of the world as broken up into the "West" and the "Soviet bloc," or roughly, the developed nations of Europe and the Western Hemisphere, and the Soviet Union and those countries in their hegemony or sphere or influence.
Sauvy made the point that there were a number of nations that didn't fall into either of these categories, who had their own agendas and needs, and like the Third Estate of the Middle Ages, were due to come into their own. Over time, First World has come to mean the developed nations of the West, and Second World is less often used to refer to the so-called "communist bloc," now almost entirely disused since the splintering of the Soviet Union.
As it happened, many of the nations in Sauvy's Third World were also less economically developed nations. As a result, over time the phrase has generally come to refer to the poorer parts of the world, without the societal, industrial, or technological infrastructure to support higher living standards for the people who lived there. "Second World" now sometimes refers to nations with developing economies, such as Vietnam, but its inherent ambiguity makes it an uncomfortable fit.
Today, some people object to the term as applied to a nation, claiming it has overtones of colonialism and paternalism, the "white man's burden" of the Kipling poem. "Less economically developed nations" is often the preferred term, or more optimistically, Developing Nations. These all imply that "development" is economic, industrial, and/or technological — a nation's intellectual, spiritual or social development remains unencumbered by terminology.