Most building codes require deck gates to be at least 36 inches tall, but you may want your gate to be taller. A taller gate makes it more difficult for small children and pets to squeeze through and can give you a little more privacy on your deck. If you have young children or pets, consider a gate that is 42 or 48 inches tall.