From Latin inoculāre 'to graft a bud,' from in- 'into' + oculus 'eye, bud,' metaphorically extended to medical vaccination.
To introduce a vaccine or antigenic substance into the body to produce immunity to a disease.
From Latin inoculāre 'to graft a bud onto a plant,' from in- 'into' + oculus 'eye, bud.' The original horticultural meaning referred to inserting a bud (an 'eye') from one plant into another. By the 18th century, the medical sense arose by analogy—inserting disease material 'into' the body to induce immunity. Key roots: *h₃ekʷ- (Proto-Indo-European: "to see (whence eye, oculus)").
To inoculate someone is etymologically to plant a tiny 'eye' in them—from the same root as 'ocular.' The bud of a plant was called an 'eye' because of its rounded shape, and the metaphor transferred perfectly to the practice of introducing small doses of disease.