c. 1200, douten, duten, "to dread, fear, be afraid" (a sense now obsolete), from Old French doter "doubt, be doubtful; be afraid," from Latin dubitare "to doubt, question, hesitate, waver in opinion" (related to dubius "uncertain"), from duo "two" (from PIE root *dwo- "two"), with a sense of "of two minds, undecided between two things." Compare dubious. Etymologically, "to have to choose between two things."
The sense of "fear" developed in Old French and was passed on to English. Meaning "to be uncertain, hesitate or waver in opinion" is attested in English from c. 1300. The transitive senses of "be uncertain as to the truth or fact of" and "distrust, be uncertain with regard to" are from c. 1300.
The -b- was restored 14c.-16c. in French and English by scribes in imitation of Latin. French dropped it again in 17c., but English has retained it.
It replaced Old English tweogan (noun twynung), from tweon "two," on notion of "of two minds" or the choice between two implied in Latin dubitare. Compare German Zweifel "doubt," from zwei "two."
c. 1200, doute, "uncertainty with regard to the truth of something," from Old French dote (11c.) "fear, dread; doubt," from doter (see doubt (v.)). The -b- was inserted later, as in the verb. Meaning "a matter of uncertainty" is from late 14c. Phrase no doubt "without question, certainly" is from c. 1400.