Fire Pokemon can still survive in water - even Charizard! What seems to have happened here is that Gengar used Confuse Ray to throw off Houndoom's coordination so he couldn't swim properly, and therefore was unable to keep up the pursuit.

Actually, if you look closely, when that houndoom went into the water, the water started to bubble and create steam. If the houndoom remains there to long, it'd lose too much energy, aka its body heat.