Gates cannot be placed directly into Terrain Paths, but they can be added to Fencing.
Creating a stacked fence with a solid lower portion, and a railing on the upper portion, can be accomplished using the Fencing and Terrain Wall tools.
Creating an outside solid stone or brick wall can be accomplished using the standard Fencing tools.