Domain wall (DW) motion and pinning in magnetic nanowires play an essential role in next generation magnetic memory and logic devices. In this paper, we experimentally demonstrate a novel device, where the DW propagation in a nanowire is locally controlled by surrounding gate magnets. DW pinning is proven by experiment and further supported by micromagnetic simulations. Prospects for 3D integration are elaborated, which indicate a scaling path to below 0.01 mu m(2) footprint while having increased speed and reliability margins. The demonstrated domain wall gate enables logic operation, can act as an on-off switch in magnetic interconnects and has far reaching applications in magnetic logic and memory devices.