Hi! The logic gate is closed by default when you place it. You can set a source position for it by control left clicking before placing (a small orange arrow will appear at the position). If the logic gate detects an item at its source position, it will open and stay open for as long as there is an item there.
For more advanced uses, the logic gate can also respond to information on the inspector panel. This can be used to detect states of different structures, including other logic gates. Inspector panel source can be set in the same way as logic gate source.
The logic gate can be inverted by control left clicking after placing. In this mode, it is open by default, and closes when it detects a signal.