c. 1300, "space, area, extent, circumference," from Old French compas "circle, radius; size, extent; pair of compasses" (12c.), from compasser "to go around, measure (with a compass); divide equally," from Vulgar Latin *compassare "to pace out," from Latin com "with, together" (see com-) + passus "a step" (from PIE root *pete- "to spread").
The mathematical instrument for describing circles was so called in English from mid-14c. The mariners' directional tool (so called since early 15c.) took the name, perhaps, because it's round and has a point like the mathematical instrument.
Meaning "limits, boundary" is from 1550s. Sense of "range of notes which a given voice or instrument can produce" is from 1590s.
The word is in most European languages, with a mathematical sense in Romance, a nautical sense in Germanic, and both in English. In Middle English it also could mean "ingenuity, subtlety, cunning." Also an adverb in Middle English: to go compass was "go in a circle, go around."