This article is from the Final-Fantasy and other Square Soft Games FAQ, by firstname.lastname@example.org (Nick Zitzmann) with numerous contributions by others.
Actually, Tifa cannot be killed by the gas, so feel free to take your
time. What you need to do is manipulate Tifa by using the buttons, so
that she can pick up the key and unlock herself. There are two ways to
do this, but remember to pace your button presses in time with Tifa's
* Press: X, X, T, X+T, T+O, O (or) X, X, T, X+T, T+S, S.
Once Tifa is free, examine the back of the room, on the left side of the
chair in order to shut off the gas, then examine the door. From there,
how to escape should become apparent.