"The word prob. belongs primarily to the vulgar and non-literary stratum of the language; but it comes up suddenly into literary use c.1000, and that in many senses, indicating considerable previous development." [OED]
Meaning "financially support and privately control" (usually in ref. to mistresses) is from 1560. The noun meaning "innermost stronghold of a tower" is from 1586, perhaps a translation of It. tenazza, with a notion of "that which keeps" (someone or something); the sense of "food required to keep a person or animal" is attested from 1801. Keepsake is first recorded 1790, on model of namesake; thus an object kept for the sake of the giver. For keeps "completely, for good" is Amer.Eng. colloquial, from 1861. Keeper "one who has charge of some person or thing, warden" is from c.1300; sense of "one who carries on some business" is from c.1440.