The gnd device is used to connect to node 0, which is always taken as the reference (ground) node in SPICE. This can be placed in the main circuit and subcircuits.
The device library may contain multiple, functionally identical ``ground'' devices, that differ only visually. In the library, any device that has no name property and exactly one node property is taken as a ground device.