During the last years of the Qing Dynasty, China was dominated by foreign powers which set up spheres of influence such as these.
At the end of WWII in 1945, however, all spheres of influence have ceased to exist and the Chinese once again had control over their whole country (whether Communist or Nationalist, and ignoring USSR's temporary occupation of Manchuria).
My question is, how and when did Britain, France, Russia and Japan gradually give up their spheres of influence?
I'm hoping someone else will be able to give a more nuanced response about the other countries, but I can comment briefly on the Japanese sphere of influence because it had a more definitive end, and more thoroughly on Three Self Movement in Chinese Christianity, which can serve as a good example of how foreign influence was systematically eradicated.
Japan gave up at the end of the second Sino-Japanese war. It was ended as part of the Pacific front of WWII---Japan having surrendered after the Soviet incursion into Russia and the American atomic bombs. As part of the victory General MacArthur ordered a full surrender of Japanese troops in all Chinese and Formosan territory (excepting Manchuria) on September 9, 1945.
In my opinion, Soviet and American influence on China continued well into the Cold War. Taiwan to this day is still a part of a proxy situation with the USA and China and depends heavily on US support even after the Cold War officially ended.
Finally, after the civil war in China ended (-ish), western Christian influence in China was still large, and there was a concerted effort called the Three Self Movement (三自教会) that was meant to prevent foreign influence on the Chinese people. The movement started with a pronouncement of the three selves (self-governing, self-growing/nurturing, self-preaching). The movement began with the following article: 中國基督教在新中國建設中努力的途徑 in the People's Daily paper on 9/23/1950. This paper was published after a 5 month campaign by some church leaders in collaboration with Zhou Enlai (the Premier of the Party at the time), and published with signatures from a coalition of leaders.
The idea is that the official Chinese church cannot be influenced or trained by western, capitalist powers. It also continues to prevent funding from western powers in Chinese churches or education today. Excepting Cultural Revolution era persecution and non-religious practice, Three Self is the only sanctioned Christian practice in China. The movement in every denomination is considered to be more or less controlled by the central communist government.
Historically, a lot of the cultural exchange and influence from the west started with missionaries to China, so the severe limitations on preaching and proselytizing was a big change.
A final note: asides from the Three Self movement, culturally, censorship control is extremely strong in China which more or less limits the influence of foreign powers. If you want to know more about the publication process of books in China, I have some firsthand knowledge and can share more, but that veers a little outside the scope of your question.
Sources:
中國基督教在新中國建設中努力的途徑 in the People's Daily paper on 9/23/1950
莊祖鯤《宣教歷史》
This gov document about the state of religion in China in 1997: http://news3.xinhuanet.com/ziliao/2003-01/20/content_697788.htm