Just a bool-style problem, when a fence gate is built, it's automatically set as open graphics, but it acts as closed. Right click does an action, opening the path on the fence, but leaving the graphic as open, except now you can walk through. After the initial set, and state change right click, the fence returns to normal.
So; when first built, you can't walk through the gate, but it's open.
Right click, dude moves to gate, action on gate, now can walk through, stays on open graphic.
Right click, dude moves again, action on gate, can't walk through, gate on closed graphic.