The Geneva Protocol of 1925 formally prohibited the deployment of poison gas. Due to the horrific effects it wrecked upon casualities, all sides were hesitant to use them even in desperation for fear of direct retaliation. It is similar to the MAD doctrine of mutually assured destruction.
As /u/MilitaryHistory pointed out below, Poison Gas is very much a hit or miss weapons system. It exerts a psychological effect, terrifying the enemy, and the death it inflicts can be horrific.
On the other hand, it's incredibly fickle, shifting with the wind to either disperse entirely, or turn back on your own forces; Gas Masks make it easy to neutralize, and it can obscure the battlefield. There's also the stigma that comes from using it. The actual deaths and casualties it produced were well below that of small arms fire (rifles, machine guns), artillery, and disease.