"fee to secure services," mid-15c., originally "act of keeping for oneself" from retain, or perhaps from or influenced by French retenir, infinitive used as a noun. Meaning "fee paid to an attorney to secure his services" is from 1818.
"servant," 1530s, agent noun from retain (v.). Also "one who retains or holds" (1540s). Meaning "dental structure used to hold a bridge in place" is recorded from 1887.