Gate for top of stairs

Ca
It is early to get a gate for baby but we need to get one for our dog for the top of the stairs so we were hoping to just get one now that would be good for both. Problem is the size of the opening at the top of the stairs it's 41 inches which is wide for most gates that I've seen. I definitely don't want the ones with the extensions dog and baby could probably walk right through it. Any suggestions for this size would be alleviated!