Is it a danger room? You open it by walking up to it and "attacking" the gate. A symbol pops up, indicating that opening the gate requires 3 energy. If you have 3 energy, then "attack" the gate again, and it will open (and you'll lose 3 energy).
Danger rooms are a fun challenge, and they offer pretty good treasure. I often prowl through Clockworks Tunnels-style levels, specifically to find them. So, if you have the energy, give one a try.