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.
Step 2: There are four major components to this gate
1) A base, ripped from your 2x4. My base was 1 1/2" tall, 2" wide and approximately 7' long
2) Two 1/2" square strips nailed to the base form a track that the hardboard gate slides in. The length should be at least as wide as the door opening.
3) A left and right gate support to hold the gate in place when open or closed. The supports are "U" shaped and fit over the outside of the base. Use two screws to secure each support to the base.
4) An additional support (not shown in this photo) which helps to stabilize the base. The design and location of this support will vary depending on your situation.