mid-14c., from Old French obstacle, ostacle "opposition, obstruction, hindrance" (13c.) or directly from Latin obstaculum "a hindrance, obstacle," with instrumental suffix *-tlom + obstare "stand before, stand opposite to, block, hinder, thwart," from ob "in front of, against" (see ob-) + stare "to stand," from PIE root *sta- "to stand, make or be firm."
The lover thinks more often of reaching his mistress than the husband of guarding his wife; the prisoner thinks more often of escaping than the gaoler of shutting his door; and so, whatever the obstacles may be, the lover and the prisoner ought to succeed. [Stendhal, "Charterhouse of Parma"]
Obstacle course is attested from 1891.