What I am suggestion is perhaps a way where you can either hold shift+alt to build a Wall Corner-post (Fence, Palisade, Brickwall), a gate, and another Wall corner-post.
While holding shift+alt, it will make a two Corner=post signs on the oustide of a Gate sign.
Reason being is it is extremely difficult to place to corner-posts at the right position while holding shift to build a gate in between.