(adv.) in excess; in addition, as well as
If you’ve ever muddled up to and too, then here’s some vindication: they’re really just two forms of the same word.
Old English only had one form of this pair, to, which operated as both a preposition and an adverb.
(Quick disclaimer: Old English being a melting pot of inconsistencies, of course, saying that it only had to-with-one-O isn’t entirely true, as it was sometimes spelled with an extra O just, y’know, for shits and giggles. Heck, in some instances in Old English, the word we’d now think of as to was spelled with an a U, an A, or even an E instead of an O. But these—including early records of too—were all just variants of a single core word, to, which is what concerns us here.)
Anyway. It’s chiefly the prepositional form that still survives as to-with-one-O in English today, used in various contexts to indicate things like a movement in a certain direction (‘We are going to Spain’), the recipient of an action (‘She gave the ball to the dog’), the breadth or limit of a range (‘4 to 5 people’), and so on. Nowadays, English also uses to as a so-called ‘particle’—a purely functional unit of language that doesn’t have much meaning on its own, but rather imparts a more specific meaning or purpose onto the words around it. It’s in this context that English uses to to mark the infinitive forms of verbs (to talk, to sing, to dance), as well as in an almost antecedental way to stand in for entire verbs and verb phrases (‘Did you finish your biology homework that’s due in tomorrow morning?’ / ‘No, I still need to’—wherein to takes the place of the entire phrase ‘to do that’, or ‘to finish my biology homework that’s due in tomorrow morning’).
Admittedly, English still has an adverb to-with-one-O, but it only clings onto existence in stock phrases like to and fro, as well as fairly old fashioned and idiomatic expressions, like ‘to pull the door to’. The rest of the time you encounter it, single-O to tends only to be a preposition.
This was the case in Old English as well, but back then to was also used as an adverb, typically implying some sense of ‘in excess’, or ‘in addition’. The way that our language came to form its phrases and sentences, however, it just so happened that this adverbial use of to very often fell at the end of statements, in a stressed position—think along the lines of ‘me too!’ or ‘that too!’ and you’ll have the right idea.
Over time, this additional prosodic weight led to this specific form of Old English to to gain an extra O—a spelling signpost used to indicate that it had a slight stress absent in most other uses of the word. This to-with-two-Os form of to first truly began to emerge in the 1500s, and as its use steadily became more formalized it eventually established itself as a distinct word in its own right. We’ve been muddling them up ever since.