I was just having this conversation with a friend. Where does the word "the" come from?
Let me introduce you to the wonderful site that is Etymonline:
late O.E. þe, nominative masculine form of the demonstrative pronoun and adjective. After c.950, it replaced earlier se (masc.), seo (fem.), þæt (neut.), and probably represents se altered by the þ- form which was used in all the masc. oblique cases (see below). O.E. se is from [Proto-Indo-European] base **so-* "this, that" (cf. Skt. sa, Avestan ha, Gk. ho, he "the," Ir., Gael. so "this"). For the þ- forms, see that. The s- forms were entirely superseded in English by mid-13c., excepting dialectal survival slightly longer in Kent. O.E. used 10 different words for "the" (see table, below), but did not distinguish "the" from "that." That survived for a time as a definite article before vowels (cf. that one or that other). Adv. use in the more the merrier, the sooner the better, etc. is a relic of O.E. þy, originally the instrumentive case of the neuter demonstrative þæt (see that).
See also my comment on this related question: How are sentences like “the longer X, the more Y” called and can they be used in formal written English?
The and that are common developments from the Old English system. Old English had a definite article se, in the masculine gender, seo (feminine), and þæt (neuter). In Middle English these had all merged into þe, the ancestor of the Modern English word the.