There are two kinds and it depends upon what you want to use and where.
1) Fixed, complete rail-road grade crossings.
These come complete with mechanisms and all you need to do is attach the track. These however, have some limitations such as the angle they can be placed and come in a select style.
2) NRC - Not Rail Connected such as the ATLS kind by Boat and others TRC, which I have not used.
These have the advantage of being able to be set at various angles to the road, and have multiple combinations of setups. These are also somewhat more difficult to configure.
To setup the fixed, complete, crossings you simply adjust the angle, connect the track, and connect the roads. The fixed angles are given as 45 or 315 degrees and refer to the angle that they cross the roads.
Look for BNSF50's Grade Xing US series. There's a gazillion of them on the DLS.
The ATLS type crossings are, as I said, more difficult to setup though more universal and versatile. These need to have an invisible track attached to the gates and lights and use a channel to link the actuators together with that crossing. There's another chap that just asked a question on settings these up and I posted a quick video on how to get them work. The video is exactly how I've used them with great success.
From the sounds of your problem, you are using the ATLS. I highly recommend you look at that video.