I know how you feel! I think my golden has hit the litter box a few times!
I have two barriers, one at the bottom of our stairs and one at the door to the room the letterbox is in. I basically use one of those wire linen shelves. Angel and Susie can get over it, but they don't, not Angel anyway.
With my other dogs I used to have I had a round litter box. I think it was called a Booda. The cat goes in the opening, up a small ramp to the opening. It worked, but eventually I moved it to our basement.
Good luck, it's not an easy solution!