We can never actually be certain of what we know of the historical Buddha. We are pretty sure he existed at some point since he is mentioned by rival sects as a real person in their texts as having had conversations with some of their famous figures and is largely accepted as a real person. Similarly, the Early Buddhist Texts give a portrayal of the Buddha which is largely at odds with the later portrayals by both the Mahāyāna and the Nikāya Buddhists -often referred to disparagingly as Hīnayāna ("Smaller/inferior vehicle") or Śrāvakayāna (disciple vehicle, insinuating that followers were simply householders)- of the Buddha as all-knowing or omniscient. There are also little details in some Buddhist texts that give us a picture of him as a human, such as him having terrible back problems later in life or dying of horrible bowl problems, or expressing a feeling of loneliness at the death of Sarriputta and Moggalāna. This is largely because records during the Buddha's life weren't written down often (and when they were, they certainly didn't survive) and the archeological record is spotty, with some people working on early Buddhist sites being...overenthusiastic, so to speak, about their discoveries, often coming to conclusions contrary to the general historical one based on their beliefs, which are often overly sympathetic to Buddhism.
#Sources
Our main source for the history of Buddhism and the life of the Buddha is the Pāli Canon, or rather the parts of it which we date to the earliest history of Buddhism, called the Early Buddhist Texts. We suss these out of the greater Canon through a few methods. First is Comparative analysis, are there parallels in other canons (especially the Gandharan Buddhist texts and the Chinese Tripitaka)? Second, linguistic and philological analysis of the text which can give us a relative date. Third, reference to other texts or ideas, does this passage or sutta reference another text which is earlier than it? Forth, historical analysis, does this text reference datable historic events? Finally, textual analysis, is this text oddly specific or portraying Buddha in a certain way that either complies or defies developments in Buddhism?
From these, we can typically date the vast majority of Suttas in the first four Nikāyas as EBTs and some parts of the Vinaya as well. These give us an idea of the life of the Buddha that is often counter to the portrayal in the spiritual hagiographies of later Buddhism (which are still quite old).
It isn't just the Pāli cannon we use though. Certain Suttas are found in Tibetan, Sanskrit, Ghandarī, and Chinese that appear to be left out or rescended from the Pāli canon. Unfortunately, since these languages appear to have been used later in Buddhism, we don't have all the techniques to analyze them thoroughly and have to rely on comparative analysis, something which has proven difficult due to the diversity of languages involved and the difficulty of obtaining certain texts.
We can also get some picture of early Buddhism from archeological remains and inscriptions, but our finds tend to post date the Buddha by around one hundred years or more. Our earliest findings are at Lumbini, or at least that is what one team of archeologists suggest, which are roughly dated to the lifetime of the Buddha, or rather the lifetime of the Buddha as given traditionally, which is odd since most modern scholars thought that date was far too early. Indeed, those findings have been criticized by other experts in the field, but only time will tell whether the Buddha is as old as Buddhists have traditionally believed. The oldest reliable findings are from the Mauryan era with the remains of Stupas and pillars of Aśoka mentioning Buddhism and texts (but with different names).
Combined, these give us some picture of early Buddhism, but hardly a complete one, and an even less complete picture of the historical Buddha.
#Background
What we do know, or at least assume from our sources, is this. The Buddha was born to an aristocratic family in the small Sakyan Republic, which was either subject to Kosala or had local governance in Kosalan lands. We know little about the Sakyas, but what we do know is rather telling and raises more than a few questions. The first is that they were an oligarchic republic with the leader being chosen from a group of aristocratic families, unusual, but not unheard of since powerful republics were present since the Vedic period. The second is that they were considered part of the "solar race" or "sun worshipers", outside of the mainstream Brahmanical Orthodox, perhaps not even following the Vedas. Third, which compounds the second, is that they married not only within their clan, but to their cousins or closer, which was almost unheard of in mainstream Aryan society. There also seemed to be some mobility in caste and perhaps a greater emphasis on Jati than Varna (Jati is mentioned far more in Buddhist texts than Varna, especially early on): also significant is the Buddhist placement of Kṣatriya above Brahman. These peculiarities are quite interesting to scholars, with some going so far as to insist that the Sakyas were not Indo-Aryans, but Scythians (Śākas), I've even seen one person insist that they Sakyas were Zoroastrian or proto-Zoroastrian. Personally, I find it likely that they were just another small, but reasonably influential, Indo-Aryan clan who happened to fall somewhat outside the norm and didn't fall into mainstream Brahmanical religion. They may have associated themselves with the "solar dynasty" of the Ṛgveda.
Later Buddhist texts assert that the Buddha was a prince and fantastically wealthy, elevating the status of the Sakyas to that of India's greatest kingdom, tracing his lineage back to the great Vedic sages. As previously mentioned, this simply isn't accurate and was meant to glorify the Buddha. The Buddha's father is given as King Suddhodana, but it is likely he was just part of the aristocracy and likely on the council. It is possible that Suddhodana was the leader of the Sakyan council and was highly influential within Sakyan republic and possibly Kosala as well. Whatever his position was, it is generally agreed that he was respected and wealthy, having a house or palace in at least two three cities.
His mother (Māyā) and Aunt (Mahāprajāpatī) were both married to his father and traced themselves to the Gotamī or Gotama clan. They were also aristocratic. It is unknown whether Suddhodana married Mahāprajāpatī after the death of Māyā or whether she was already his consort. It seems likely that it was the later, polygamy was not uncommon among the aristocracy in Ancient India, but the fact that they were sisters is a little odd.
#Birth and Renunciation
Siddhattha Gotama was born either in the mid 6th century or early 5th, we aren't entirely sure and while today scholars favor the "short chronology" it is still a hotly disputed matter, especially among the more extreme Buddhists (some in China and Tibet insist on dates as early as the 11th century!) but scholars tend to stick to either the 6th or 5th century. As mentioned above, his mother was the chief consort of a powerful leader in the Sakyan republic. His mother died shortly after his birth, within a week, probably due to complications from the birth. He was nursed by his aunt Mahāprajāpatī and took the name Gotama from her (Gotamī). His half brother, Nanda (not to be confused with his cousin Ānanda) was significantly younger than him and was possibly born after his renunciation. We know little of his childhood as what is written in the texts is...less than reliable...but he probably had a decent education which included statecraft and philosophy as was common for aristocratic families.
When he was sixteen, he was married to his cousin Yasodharā (we don't actually know her name, it isn't mentioned in the EBTs and only given later). The Pāli cannon mentions that he lived a life of splendor and wealth, but eventually found it unsatisfactory. At some point, Siddhārtha had a son whose name is given as Rahula ("fetter" likely not his real name).
At age 29, the Buddha left his home and became an wanderer. Tradition has it that he left on the night of his son's birth, riding off dramatically in the night, but the Pāli canon makes no mention of this, simply stating that he left after realizing that life was unsatisfactory in the face of death. It is unclear whether Rahula was born before or after renunciation, nor whether Rahula was his only son. Furthermore, in this passage, no member of Siddhattha's family is mentioned.
In any case, the Buddha sought out teachers. He first went to someone called Alara Kalama but left after he found Kalama's teachings as incomplete, though Kalama apparently offered Siddhattha his place as teacher upon his learning and understanding of the teachings. He then learned from Uddaka Ramaputta, who viewed Siddhattha as his equal upon his attainment of the Jhānas. Finding no comfort in the teachings of either teacher, Siddhattha joined a group of five ascetics and took up an extreme ascetic lifestyle. His study under these two teachers is probable, but their praise of him seems exaggerated, but who knows, maybe the young Siddhattha simply had that effect on people.
In any case Siddhattha undertook several years of rigorous austerities with the ascetics (who are sometimes identified as Ajivikas or Ajiviyas, an identification which seems possible and I would support with some hesitation). In his own words (or words that are ascribed to him) he states that he grew thin enough to touch his spine through his stomach, which might be a metaphor, but such extreme austerities weren't uncommon at this period and among certain sects, suicide by starvation was common. However, he had not achieved enlightenment, and thus left them behind.