Depending on size of building and size of openings its possible to configure the gates so they open up onto them selves as illustrated in these picture.
Notice there is mesh on these gates to stop feet/hoofs etc getting through.
Central gate dividers can also be implemented inside your building.
Re enforced part wall to take up any difference in gate sizes,