It lies between the Tibetan and Huangtu plateaus, and borders Mongolia, Inner Mongolia, and Ningxia to the north, Xinjiang and Qinghai to the west, Sichuan to the south, and Shaanxi to the east. The Yellow River passes through the southern part of the province.
Gansu has a population of 26 million (2009), covers an area of 425,800 km2 (164,400 sq mi). The capital is Lanzhou, located in the southeast part of the province.
In prehistoric times, Gansu was host to a number of Neolithic cultures. The Dadiwan culture, from where numerous archaeologically significant artifacts have been excavated, flourished in the eastern end of Gansu from about 6000BC to about 3000BC. The Majiayao culture and part of the Qijia culture also took root in Gansu from 3100 BC to 2700 BC and 2400 BC to 1900 BC respectively.
The Yuezhi originally lived in the very western part of Gansu until they were forced to emigrate by the Xiongnu around 177BCE. The State of Qin, later to become the founding state of the Chinese empire, grew out from the southeastern part of Gansu, specifically the Tianshui area. The Qin name itself is believed to have originated, in part, from the area. Qin tombs and artifacts have been excavated from Fangmatan near Tianshui, including one 2200-year-old map of Guixian County.
In imperial times, Gansu was an important strategic outpost and communications link for the Chinese empire, as the Hexi corridor runs along the "neck" of the province. The Han dynasty extended the Great Wall across this corridor, also building the strategic Yumenguan (Jade Gate Pass, near Dunhuang) and Yangguan fort towns along it. Remains of the wall and the towns can be found there to this date. The Ming dynasty also built the Jiayuguan outpost in Gansu. To the west of Yumenguan and the Qilian Mountains, at the northwestern end of the province, the Yuezhi, Wusun, and other nomadic tribes dwelt (Shiji 123), occasionally figuring in regional imperial Chinese geopolitics.
By the Qingshui treaty, concluded in 823 between the Tibetan Empire and the Tang dynasty, China lost a part of Gansu province for a significant period of time.
Situated along the Silk Road, Gansu was an economically important province, as well as a cultural transmission path. Temples and Buddhist grottoes such as those at Mogao Caves ('Caves of the Thousand Buddhas') and Maijishan Caves contain artistically and historically revealing murals. An early form of paper inscribed with Chinese characters and dating to about 8BC was discovered at the site of a Western Han garrison near the Yumen pass in August 2006 
The province was also the origin of the Dungan Revolt of 1862-77, which later spread to much of China and resulted in the deaths of upwards of twelve million Chinese Muslims in addition to the decimation of Chinese Muslim culture in Yunnan province, where over one million Muslims were killed by Qing dynasty imperial forces. Among the Qing forces were Muslim Generals like Ma Zhan'ao and Ma Anliang who helped Qing crush the rebel Muslims. The revolt had spread into Gansu from neighbouring Qinghai.
Frequent earthquakes, droughts and famines have tended to slow economic progress of the province until recently. Based on the area's abundant mineral resources it has begun developing into a vital industrial center. An earthquake in Gansu at 8.6 on the Richter scale killed around 180,000 people in 1920, and another with a magnitude of 7.6 killed 275 in 1932.
Muslim General Ma Hongbin was acting Chairman of the province, and Muslim General Ma Buqing was in virtual control of Gansu in 1940. Liangzhou District in Wuwei was previously his headquarters in Gansu, where he controlled 15 million Muslims.