When you click the wall segments you want to create the gate in, make sure the ghosted gate isn't red. If it is, no gate will be created. You can only create gates when you have wall segments that are on fairly level ground. It takes a little getting used to, but you'll get the hang of it shortly.