The gates come in 7 sizes (5×3 4×3 4×2 3×2 3×1 2×2 2×1). They open and close with E like any other door and place towards you (unless you rotate).
This is a modlet and does not require a world restart. Simply place into Mods folder and play!
Tested and works with Alpha 19.2 b3
Recommended to be played single player or multiplayer. Works fine on servers as well.
Added a 2×2 size variation.
The forum topic of the mod is here.