properly means contention in the athletic games; and to agonise is the act of contending. (Greek, agon, a game of contest, as well as a “place of assembly”).
Agony, meaning “great pain,” is the wrestle with pain or struggle with suffering.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Agony from Infoplease: