1650s, in reference to ancient Greece, "contest for a prize," from Greek agon "struggle, trial," especially in the public games (see agony) but also of contests for prizes in poetry, theater, music. Meaning "verbal dispute between characters in a Greek play" is from 1887. Related: Agonal.
All over Greece we find all endeavor taking the form of a contest, an agon. Before the age of Archilochos, Sappho, and Alkman, we hear of contests of trumpets, city against city, the splendor of which tantalizes the imagination more than all the kings and archons in the history books. [Guy Davenport, "7 Greeks"]