I've read that gapeworm is not very common - I've not worried about it. Oftentimes people think the issue is gapeworm and it is something else. At least that's what I've gathered from combo of my chicken books and here.
Gapeworm is a parasite that lives in soil, earthworms, snails and slugs. When a chicken eats the earthworm (or pecks infected ground), it completes the cycle. The worm attaches to the back of the throat of the chicken to feed on blood there.
Symptoms are gaping mouths with gasping usually with upturned head.
Treatment is safeguard (fenbendazole) or ivermectin which treats a number of other internal parasites.
Prevention is to prevent them from eating earthworms, slugs or snails...but where is the fun in that for a chicken? You'd have to put them in cages and never allow them on soil.