You can replace the 2" x 4"s with any 1" or 2" thick boards with a width that matches the rest of the fence. The thicker the board, the better, to make the gate sturdy and durable.

For a sturdier gate, add a diagonal brace across the square. Instead of nailing the boards together, drill holes and connect them with carriage bolts.

If your gate has a diagonal brace, the lower side of the brace should be next to the hinges.

You can in install a heavy spring so the gate closes automatically, as with a screen door.