A.V.
Zip ties. We mounted a curved gate to the top of the stairs by fixing one side to the wall and used zip ties (the big ones) to fix it to the railing. You can also get toilet locks, but we found it to be just as effective to keep the door shut and use a baby lock on the handle.