habit (n.) Look up habit at Dictionary.com
early 13c., "characteristic attire of a religious or clerical order," from Old French habit, abit "clothing, (ecclesiastical) habit; conduct" (12c.), from Latin habitus "condition, demeanor, appearance, dress," originally past participle of habere "to have, hold, possess; wear; find oneself, be situated; consider, think, reason, have in mind; manage, keep," from PIE root *ghabh- "to give; to receive" (source also of Sanskrit gabhasti- "hand, forearm;" Old Irish gaibim "I take, hold, I have," gabal "act of taking;" Lithuanian gabana "armful," gabenti "to remove;" Gothic gabei "riches;" Old English giefan, Old Norse gefa "to give"). The basic sense of the root probably is "to hold," which can be either in offering or in taking.

Meaning "clothing generally" is from late 14c. Meaning "customary practice, usual mode of action" is early 14c. Drug sense is from 1887. The Latin word was applied to both inner and outer states of being, and both senses were taken in English, though meaning of "dress" now is restricted to monks and nuns. In 19c. it also was used of the costume worn by women when riding on horseback.
habit (v.) Look up habit at Dictionary.com
mid-14c., "to dwell, reside; dwell in" (obsolete), from Old French habiter, abiter "to dwell, inhabit; have dealings with," from Latin habitare "to live, dwell; stay, remain," frequentative of habere "to have, to hold, possess" (see habit (n.)). Meaning "to dress" is from 1580s. Related: Habited; habiting.