What depth does a gate post need?
The really professional way is to set a bracket in concrete, then bolt-through the posts to the brackets. While slightly more $ (cost of bracket and bolt) and more effort, this will give you a long life solution that is easy to maintain over time. The concrete for the bracket should be 24-30" deep, 8" diameter for posts of this size.

Setting the post in concrete will give longer life than simply setting teh post in the dirt. It is good to slope the top of the concrete away from the wood post so that rain does not puddle next to the post. 

Some of us (who have been doing this for years) now also trim the top of the post at an angle, so that water is more likely to run off the top of the post rather than puddle.