How do I hang a new wooden gate so that it automatically stays closed when it is shut but also stays open at its maximum open span?
If the hinges are on the same vertical line, then (as noted by @DA01) the hinge should stay wherever you leave it (absent wind, etc). If the hinges aren't vertically aligned, then the gate will want to swing towards a specific point. You can use this to solve your problem.

Imagine that the gate is swinging on a rod, and can go 360&deg; around the rod. If the rod is vertical then you can put the gate anywhere you want and it will stay. However, if the rod is leaning towards a certain direction, then the gate will tend to swing until it is pointing in that direction (because the gate will be lower at that point).

What if you move the gate to the exact other side of the rod from where it wants to go? It will sit there, balanced. If you then move it in either direction it will continue to swing in that direction until it reaches its low point.

So, what you want to do with your gate is to align the hinges so that the hinge line leans away from the the middle of the gate's range (at 45&deg;). That way the gate will tend to swing away from the 45&deg; point, towards the nearer of 0&deg; and 90&deg;.

Edit: When you do this, you may have to readjust the position of the gate on its hinges in order to have the gate properly fit into its opening. But, once you adjust the post side of the hinges to get the right swing, changes to the gate side of the hinges won't affect the swing, so you won't have to readjust anything.