Hi - this is an excellent question! :)
Although Clostridium perfringes is can survive in the presence of oxygen (technically, it is 'aerotolerant'), it really flourishes under conditions of low oxygen pressure.
The process of causing 'gas gangrene' starts when the bacterium gets into an ischaemic wound (lack of blood, and therefore low too oxygen). Think, perhaps, of a bad fall onto the ground, which contains clostridial spores.
Once in the wound, it produces various (at least 12) toxins and tissue-destroying enzymes. The resultant damage has two effects - it allows the organism to establish itself and mulitply, and it disrupts blood supply to the area. This lack of blood obviously lowers the oxygen tension even more (oxygen is carried in the blood), which promotes clostridial proliferation and spread even further.
Riding on the crest of an advancing wave of ischaemia and necrosis, the bacterium can thus spread to surrounding tissues. The gas within the tissue, so distinctive in this condition, is formed as a byproduct when the toxins destroy the previously healthy surrounding tissue.
The condition spreads rapidly in this manner and can easily be life-threatening. Treatment involves both antibiotics and debridement of the wound (down to an unaffected area with good blood supply).