Google babydan baby gate. They come in expandable packs to fit any shape and are not that expensive.
We got 2 large packs for closing off our open lounge, stair area, one over a gap of about 5 ft the other a bit bigger and with funny angles. They worked so well that we bought the fire guard pack and some extra lengths so we could enclose the woodstove and the log and ash bins!
When you measure up, make sure you allow for the length of a toddlers arm reaching through- don't try and make the guard too small!