Step 1: Low Tech, But Effective
I built this dog gate from left over scrap lumber but all you really need are a few 2 x4's that you can rip on your table saw plus piece of 1/8" or 1/4" thick hardboard.
The size of the gate, both the width and height are variable depending on the size of your dog AND the size of your door. For that reason I am not recommending specific dimensions.
The next few steps will detail the basic design which you can follow or modify as needed.