Some effects require you to have line of sight to your target. As long as you can
precisely sense the area (as described in
Perception) and it isn't blocked by a solid barrier (as described in
Cover), you have line of sight. An area of
darkness prevents line of sight if you don't have
darkvision, but metal gates and other obstacles that aren't totally solid don't. Usually a 1-foot-square gap is enough to maintain line of sight, though the GM makes the final call.