Ein Anfall dauert ungefähr fünf Minuten.

Can this mean both a bout of a medical condition (like of an illness, or seizures, etc.) and of a sports competition, like boxing? Or only a medical condition? (I have only ever seen this word used in that context.)

Anfall is usally only used in medical contexts. Other contexts might be possible but only in specific areas.