I thought that Charlemagne lived in an age where authority had to be earned first in battle instead of simply inherited. I keep reading about how he gained power through various decrees that he made. How did he hold that authority in the first place? Why was there already so much legitimacy placed in his succession to his rule over his territory?
warhistoryonline.com/medieval/charlemagne-conquered-half-europe.html
Nobody in Francia just "inherited" kingship trough battle and the many minority regencies in Merovingian era could attest that : while it's true that early medieval kingship, as it was the case for the late Roman Empire, had a strong military aspect, the sources of royal power were more rooted in state and political legitimacy, which would be covered by both dynastic and personal prestige (think of it as an accumulated political capital trough generations), control of state institutions and regional aristocracies (trough military dominance but as well, and critically, distribution of honors, land, wealth, functions, etc.), the support of the Church (both regionally and from Papacy), etc.
Francia was arguably a bit particular in Late Ancient and Early Medieval Europe having effectively prestigious and sacralized dynasties : Visigothic Spain mostly ended up with an anti-dynastic kingship where the aristocracy simply didn't allowed a same family or network to monopolize the royal function past two or three generations; Lombard Italy being mostly similar to the former partly due its important regionalism. These were more, however, evolution on a formerly dynastic model that failed for various reasons, but came from Late Ancient (and partly Roman) practices. Even there, mere military power didn't mean much on its own, without institutional or political support.
Merovingian prestige was strong enough that for 300 years, no dynastic outsider is mentioned by the sources, either as a regional challenger or someone pulling a William the Conqueror on them. Gondovald, allegedly an unacknowledged son of Clothar, did attempted to impose his claims in the context of the royal faida (sort of mix between a hot and cold civil war) and even there, utterly failed to.
Charlemagne's family, known as the Carolingian family, was a Frankish aristocratic line originating from the eastern sub-kingdom named Austrasia. It's unclear where they exactly come from, and they were probably (as several other Frankish families) the result of intermarriage between Barbarian and Roman families happening in the Vth and VIth century. The VIIth century was a difficult time for Merovingian kings as successive minorities regencies were in place, with few kings living long into adulthood; weakening the state associated with the dynasty and favoring the rise and autonomy of regional aristocracies, centered on the sub-kingdom's palatial networks which existed independently of the effective presence of a king (although depended on the reality of a Frankish king for their legitimacy) and presided by a majordomo (mayor of the palace), meaning the Steward of the palace.
An ancestor of Charlemagne, called Peppin, was named majordomo and although his son failed pulling a coup, a distant branch of the family took the mantle and succeeded at the end of the century having Peppin II being majordomo of all three sub-kingdoms, ostensibly in the name of the king, against his opponents.
His son Charles Martel successfully won civil war against both his step-brother and supporting families, and the majordomo of Neustria chosen by the king, didn't proclaimed himself king either: instead, by fighting against regional opponents (in Neustria and Burgundy), autonomous regional rulers (in southern Gaul and Germania, but part of the Frankish realm in its broad sense); and against both Frisii (a pagan people that dominated North Sea trade) and Arabo-Berbers at the Battle of Tours and the Battle of La Berre, Charles became a particularly prestigious figure, which benefited his family's authority and reputation, a capital his descendants could invest on, to the point he effectively ruled Francia as a regent but without replacing the king after his death. His sons did have to name a new Merovingian kings, but eventually Peppin III felt strong enough (having crushing the last opponents) to remove him and be proclaimed, with the support of the aristocracy, the Church and the Pope, the new king.
Charlemagne's accession to the throne was simply not put in question, thanks to two centuries of political build-up against what was essentially the most prestigious dynasty of early medieval Western Europe. The tensions and conflict with his brother Carloman wasn't due to a lack of legitimacy of either (sharing the rule was a practice with a long history, both among Merovingians and Late Roman emperors), but political infighting about who would be the sole ruler.