1690s, "to set in opposition with a view to show the differences; to stand in opposition or contrast; to set off (each other) by contrast," from French contraster (Old French contrester), modified by or from Italian contrastare "stand out against, strive, contend," from Vulgar Latin *contrastare "to stand opposed to, withstand," from Latin contra "against" (see contra) + stare "to stand," from PIE root *sta- "to stand, make or be firm."
Middle English had contrest "to fight against, to withstand," which became extinct. The modern word is a 17c. re-introduction as a term in fine arts, on the notion of "to exhibit differences or heighten effect by opposition of position, form, color, etc." Related: Contrasted; contrasting; contrastive.