If the wall is plastered block (not plasterboard), do this:
I use brown plasplugs for pretty well everything. Red and yellow ones are weedy.
You can get 6mm or 7mm, in your case I would go straight to 7mm.
You can get a small pack in most hardware or DIY shops.
Like this
In the middle of the block of plugs (it unfolds) you will find a flat plastic rectangle, embossed on it are the sizes or screws and drills they fit, and sample holes that fit them.
use no. 8 screws (4mm diameter). You may need to buy a few if your existing ones are too short.
You need a screw and plug that penetrate at least 25mm into the brick or block, disregarding the thickness of plaster, which has no strength, and the wood or other object you are screwing into it. Plaster is usually about 18mm thick, so a screw 45mm plus the gate thickness.
As you have a crumbly wall, first check that your holes are deep enough and wide enough for the plug and the screw to go into. Drill them if not. Then, clean out the dust and loose material with a vac cleaner hose or a water jet. For this method, it does not matter if the plugs are a loose fit.
You will need a tube of builders adhesive no-more-nails is an example, but an own brand will do. I would go for a solvent-free one as you can clean up with water. Unless you have, or buy, or borrow, an applicator gun, get a tube like a toothpaste tube, not the big cartridge. You need a long pointy nozzle with it. I think Tesco and Wilko have them. Own brand is cheaper if they have it. THIS IS NOT FILLER.
Insert the nozzle into the hole, pushing it right to the back so there is no airspace. Inject the adhesive, withdrawing the nozzle as the hole fills. Stop half an inch or so before the surface.
Press the plasplug into the hole so that it sinks into the adhesive. This will cause the adhesive to bulge up to the surface. Push the plug slightly below the surface of the wall (this is so that, when redecorating, you do not need to pull it out). You can put a screw a couple of turns into it as a handle.
hold the gate up against it to verify that they are in the correct position. Wipe the wall clean.
Leave it for 24 hours until the adhesive is set firm.
You can now drive your screws into the plasplug. The set adhesive will transmit the expansion force into the wall, it is slightly flexible so will not crack, and it will have glued itself into place, and will hold the plasplug so it is not loose and cannot turn.