What specifically are you asking? Is it that China is an unbroken entity stretching back 5000 years? Or are you asking about the history of the people who lived in the region?
There some discussion of Xia as the starting point of China, but what about the Neolithic cultures that preceded them?
C. 5000 – 3000 BCE: Yangshao culture becomes dominate, but various Neolithic cultures that existed alongside Yangshao: in the north Xinle, in the south Shanbei, Majiabang, Dalongtan, and Dapenkeng.
3000–2000 BCE: Longshan culture in central plains, but various Neolithic cultures existed alongside Longshan: in the west Qijia, Daxi (in southern Longshan), along the coasts Dawenkou, Liangzhu, and Hemdu.
Mythical 3 Sovereigns & 5 Emperors (c. 2800–c. 2200 BCE)
The dates for Erlitou (2100–1800 BCE), being contemporaneous, indicate the site may have existed alongside the Xia, although alternative views include Erlitou being an intermediate state, or separate entirely from the Xia.
The Shang dynasty (1600–1050 BCE) is the earliest dynasty w/ solid evidence behind its existence, but Harold Tanner’s China: A History notes that historians more readily accept that multiple states like the Xia, Shang, and Zhou existed alongside rather than the linear narrative of Shang following Xia, and Zhou following Shang.
Whether China has 5,000 years of history in terms of “civilization” is debatable. Some had writing like Liangzhu (c. 3000–2000 BCE), but that varied from what we know as traditional Chinese writing. There is continued debate about what the Xia and Erlitou were, but if the Xia existed alongside the Shang and Zhou states, then maybe Neolithic would be evidence of the length of Chinese history. The varied Neolithic states traded with each other and warred, but saying that Chinese culture extended that far back as a measure of history is dubious, and archaeology regarding the Neolithic period has various controversies. At best the furthest date would probably be the Shang dynasty, so with 1600 BCE as the starting point it would be about 3,616 years, making it about 1300 years short of the 5,000 claim.
It really depends on what kind of China you're talking about. Hard archaeological evidence and ancient historical records of Chinese civilization, at least in terms of 'dynastic' Ancient China, can be traced back to 1500 BC (the Shang, or 商, Dynasty). That is 3500 years of proven history, which is formidable, but still, quite short of 5000 years.
When people say China has a history of 5000 years, I suppose they are also taking into account the Xia Dynasty (problematic, because it is considered semi-legendary at best, with no archaeological or historical evidence for its existence outside of myth) and/or the tribal, hunter-gatherer stage of the Chinese civilization, or the Pelligang civilization, which can be historically traced as far back as 7000BC, which is certainly over 5000 years of history (but again problematic because you can't really prove Pelligang culture was the same as Chinese culture; they were just in the same place).