After being the wealthiest place on earth for most of history, China somehow declined to the point that it was the poorest place in the world by the mid-1900s- even poorer than sub-Saharan Africa.
How did this happen?
First, for most of history, the wealth of countries/regions, as measured by GDP per capita, has been fairly uniform, with little difference between wealthy and poor regions. Most regions had economies based on agriculture, usually at little above the basic subsistence level. The GDP per capita then consists of little more than a year's food per capita. Even if there is a significant amount of industry, this is spread over many subsistence or near-subsistence farmers when it comes calculating GDP per capita.
Maddison (2007) gives quantitative estimates allowing us to compare China with other regions for various years (years are all AD, GDPs are in 1990 international dollars):
| Region | 1 | 1000 | 1500 | 1600 | 1700 | 1820 | 1850 | 1900 | 1937 | 1950 |
|---|---|---|---|---|---|---|---|---|---|---|
| China | 450 | 466 | 600 | 600 | 600 | 600 | 600 | 545 | 580 | 448 |
| Africa | 472 | 425 | 414 | 422 | 421 | 420 | 500 | 601 | n.d. | 889 |
| Australia | 400 | 400 | 400 | 400 | 400 | 518 | 1,975 | 4,013 | 5,746 | 7,412 |
| Western Europe | 576 | 427 | 771 | 888 | 993 | 1,194 | 1,567 | 2,885 | 4,328 | 4,569 |
The basic subsistence level of GDP is 400; this is seen in pre-colonial Australia. Western Europe and Africa start with relatively high GDPs due to Roman industry and trade. The Western Europe GDP then declines in post-Roman times to closer to the subsistence level, and then rises due to Italy's contribution (with increasing urbanisation) and rises further due to urbanisation in northern Europe. Already by 1500, the GDP per capita in Western Europe is greater than China's.
Overall, the Chinese economy was very large, and the total output of Chinese industry was high. However, Chinese industry still depended on individual skills and labour - China lacked the steam-powered industrial revolution that boosted the productivity of industrial workers in Western Europe. Thus, China entered the 19th century with a fundamentally agrarian economy, with a veneer of industry, and the GDP per capita was only about 50% greater than basic subsistence. China was rich, but the average Chinese farmer was poor.
The Chinese economy suffered badly during the 19th and early-mid 20th centuries. Wars with the West and Japan hurt the Chinese government economically, but had little impact on the Chinese economy as a whole. Internal rebellions such as the White Lotus Rebellion and the Taiping Rebellion hurt the Chinese economy much more - war disrupts agriculture and trade, and increases the severity of famine and disease. Droughts resulted in multiple severe famines (e.g., the famine of 1876 killed about 1/3 of the population of Shanxi province). In view of such things, the decline in GDP per capita from 1850 and 1900 is unsurprising. This decline was followed by significant recovery, despite the country remaining agrarian and ununified, with sporadic civil war. The Second Sino-Japanese War which followed that recovery was an economic catastrophe. Cities were severely damaged by fighting and bombing, and war brought famine and disease - China's agricultural productivity dropped by about 30%. Industry was shattered by over a decade of war. The large drop in GDP from 1937 to 1950 is the impact of this war and the Chinese Civil War.
The post-war recovery was driven by restoring industry and agricultural productivity, followed by further industrialisation and modernisation of agriculture. Average rice yields per hectare have more than tripled since 1960, and yields of other crops have also increased, allowing fewer people to feed more. China has seen a large rise in urbanisation since 1950, from about 11% in 1950 to about 60% today. (Urbanisation can be a bit tricky to compare, since definitions of "rural" and "urban" vary by country, but according to the CIA World Factbook data, the lowest current urbanisation is 13% (Papua New Guinea), and fewer than 10 countries have urbanisation below 20%.)
References:
Angus Maddison, Contours of the World Economy 1-2030 AD, Oxford University Press, 2007.
The data above is from an updated version of Maddison's original data, available from the final version of his website: http://www.ggdc.net/MADDISON/oriindex.htm (see the "Historical Statistics" section). Note: The datum for Africa 1850 is actually the 1870 value.
CIA World Factbook urbanisation data: https://www.cia.gov/library/publications/the-world-factbook/fields/349.html