Lionel Mainline crossing gates have three wires. Red,Black, Yellow. Yellow goes to insulated rail. Red and Black to power. Simple hookup.
Not sure what version you have but the 6-14098 Mainline crossing gates that I have are a 5 wire device, and still need an external relay just like the Railking does. Yours must be newer.