Old English agan (past tense ahte) "to have, to own," from Proto-Germanic *aiganan "to possess" (source also of Old Frisian aga "have to, ought to," Old Norse eiga, Old High German eigan, Gothic aigan "to possess, have"), from PIE root *aik- "be master of, possess."
The original sense is obsolete. The meaning "to have to repay, be indebted for" began in late Old English with the phrase agan to geldanne literally "to own to yield," which was used to translate Latin debere (earlier in Old English this would have been sceal "shall"); by late 12c. the phrase had been shortened to simply agan, and own (v.) took over this word's original sense.
The intransitive meaning "be in debt" is from mid-15c. To be owing to "be due or attributable to" is by 1650s.
An original Germanic preterite-present verb (along with can (v.1), dare, may, etc.). New past tense form owed arose 15c. to replace oughte, which developed into ought (v.).