There are two ways out of here. Both are through the glowing red gates.
You can turn them off with the red switches.
The first way is the more direct one -- through the exit closer to the top of the screen. Just fight your way past the three guards in that room.
You can then open the doors out of the complex by hitting the switch with a ball. You'll have to face a few more guards on your way out.