There are only two kinds of fences and gates: wooden and nether brick. Nether brick is of course stronger, but since gates and fences don't weather like weapons and tools, that doesn't really matter. However wood is prone to fire which can be a pain if a miscalculation is made.
The main use of gates and fences is livestock. Since gates and fences cannot be jumped by animals, Villagers, or monsters. They are great for breeding. By keeping animals in closed penned quarters, they cannot wander and can be kept close by for easy access for food and resources like milk and eggs.
Since fences cannot be jumped, gates provide a means to get through them. They operate the same as doors, and are activated by the left trigger. Gates also come in wood and nether brick. Gates open to make a one-block-sized opening.
Fences do keep out monsters that are outside of it. But if the area inside the gate is not well lit, monsters can spawn there. For this reason it's important to be conscious of your fenced in space. If a monster spawns within a fenced in enclosure, it could get difficult for you and/or the monster to get out as some monsters and animals glitch when pushed through gates.