Automatic, pressure plate activated, 2x3 piston gate.
Gate is accessible from both sides, and does not have a locking mechanism; you are free to edit and post your version if you can.
Schematic has restone wiring beneath the pressure plates. Place 3 blocks into the ground for best result.
Works well in both modern and medieval settings, or even has a hidden entrance in a library.