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) and has a large concentration of Hui Chinese, and the historical home, along with Shaanxi of the dialect of the Dungans, who are Hui who migrated to Central Asia. The southwestern corner of Gansu is home to a large ethnic Tibetan population. The capital is Lanzhou, located in the southeast part of the province. Gansu is abbreviated as "甘" (Gān) or "陇" (Lǒng), and is also known as Long West or Long Right, in reference to the Long Mountain east of Gansu.
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 6000 BC to about 3000 BC . 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 this area until they were forced to emigrate by the Xiongnu around 177 BCE. The Qin state (秦), 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 for a long while the whole Gansu province.
Situated along the Silk Road, Gansu was an economically important province, and a cultural transmission path as well. 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 8 BC 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 Muslim Rebellion 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 forces. Among the Qing forces were Muslim Generals like Ma Zhan'ao and Ma Anliang who helped Qing crush the rebel Muslims. The Dungan revolt (1895–1896) spread into this province from Qinghai.
Its frequent earthquakes, droughts and famines have tended to slow its economic progress, until recently when based on its 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.