I would get two Evenflo wooden baby gates. I suggest this model for its proven, simple design and wooden construction.

Then do this:
Shorten the second gate
- Separate the mounted and sliding panels of one gate assembly. You can probably just bend the slide brackets as you won't be reusing them. Set the sliding panel aside, as you won't reuse that either.
- Remove the the slide brackets from the mounted panel. I suspect that these are simply screwed on, but grinding of rivets may be necessary.
- Cut the top and bottom rails of the mounted panel to the dimension where they'd intersect the gate that will come across the head of the stairs at 90 degrees. Don't cut too close to a vertical baluster to avoid weakening the panel. Use a miter saw if available, and bevel the cut corners slightly so they're gentle on skin.
Connect the two gates
Using new hardware of suitable size, connect the mounting brackets of the intact gate to the cut ends of the shortened gate. You'll want to drill and use secure bolts to so so. Don't rely on short wood screws. Sleeve bolts would give a nice appearance, but nylon-insert nuts on regular bolts would work.
Mount both gates to the wall
You now have essentially created an extended, articulating gate. Using the same procedure outlined in the product instructions, mount the shortened gate to the wall corner along the stairs, and the spring clip receivers to the wall parallel to the stairs.
________ ▼-- spring clips ▼-------- intact gate's mounting hinges
| ____________________________ _
| __|______________________|__| | ◄-- connection with new bolts
wall | intact gate | |
|__________________________ | | ◄-- shortened gate
| | | |
| | |_| ◄-- mounting hinges OR spring clips
| stairs |__|_|_______________
|__________________________| ▲-- wall
| |
Benefits and options
Clean, simple, inexpensive. Only modest woodworking skills required.
You can swing the gate to the reverse side when it's not needed since the gate-gate connection is hinged.
Of course, you could use the sliding panel for the shortened gate, with its spring clips, and the entire thing would be easily removable.
The entire thing is mounted with a few screws and is therefore removable when baby reaches a suitable age (and reinstalled when s/he becomes a teenager).
Stability concerns
If you find that the assembly wants to sag at the corner, you could do one of two things:
- Add a wooden "leg" or small wheel for support.
- Rigidly connect the two panels of the intact gate so they act as a shear plane with one screw in each of the top and bottom rails. This would require you to move the entire assembly when opening and closing the gate, which could wear the carpet unless you use a slider foot. This would also resolve the problem of baby lifting the gate.