Adding to Henry and BEG, what I did was take clear plexi-glass and VERY CAREFULLY drilled 3/8" holes about an inch apart (and drilled pairs, above and below each other), and used wire-ties to 'tie' them to the balusters. The plexi-glass was NOT the thinner type because if the child attempted to 'pull themselves up', I didn't want it to break on them. The major Home Centers have sheets of them and they can cut them too. So, take height and width measurements at home of where you want to place the plexiglass.
Now, this is assuming (from your post) that you're trying to protect your child from falling through the balusters; NOT down the stairs. W/O seeing what the upper portion looks like, I can't suggest anything to protect the opening at the top of the stairway. BUT, it's not hopeless. Go to any Baby Store and ask to look at Safety Gates. Measure your stair-opening, height and width (like the balusters), and see if the unit will work for you. Ask the retailer if you can return it if it doesn't 'fit' properly.
My best to ya and hope this helps.
PS: If you're drilling the plexiglass, get a scrap piece from the store and experiment drilling with it so you can get a 'feel' for the needed pressure to make a hole w/o breaking the glass. DO take your time and get a new bit for such a job to increase your chances for successful drilling. The Electrical Dept. has the Wire Ties. OH, and BEFORE you drill, hold the finised cut piece of plexiglass up against the balusters and 'mark' with a marker where you should drill your holes. If your balusters are like mine, the upper portion is THINNER than the lower portion, and the distance between the holes is GREATER at the bottom. (Again, drill a set of holes ABOVE and BELOW each other; in pairs.)