Much like regular fence posts, gate posts are typically sunk into the ground. But because of the nature of a gate, these need to be installed even more sturdily.
Make sure that the gate posts are at least 90 cm (3 feet) longer than their finished height.
Lay the gate on the ground with the posts on each side of it in the correct position.
Nail three slats of wood across the gate area onto the posts. This will keep them the same distance apart when you pick them up.
Dig a trench across the space where the gate will eventually hang. It should be about 15 cm (6 inches) wider than the posts, a foot across, and 90 cm (3 feet) deep at the ends.
Put 5 to 7.5 cm (2 to 3 inches) of gravel in the bottom of the trench for drainage.
Set the posts into the trench.
Use a bubble level to check that the posts are vertical, then brace them with 2-by-4s. Nail one end of each 2-by-4 to the post and the other end to a short stake driven into the ground -- the idea is to hold the post firmly in place (see Tips).
Mix the concrete: one part cement, two parts sand, three parts gravel. Add enough water to make it thick but not chunky.
Pour concrete into the trench up to ground level.
Poke the air bubbles out of the concrete with a 1-by-2 board.
Check the level and adjust the posts if necessary.
Use a trowel to add some more concrete around the base of each post, making it mound-shaped. This will allow water to run off and not pool around the posts.
Level the concrete in the center part of the trench with the ground, sloping in one direction just slightly for water runoff.
When bracing the posts with 2-by-4s, two boards nailed to adjoining sides of the post should keep it steady and vertical. An old wheelbarrow and a shovel work well for mixing concrete. Be sure to rinse them thoroughly before the concrete dries.