If 2 X 4 welded woven wire is an option, then I would go with that. Also keep in mind that they might be able to push out underneath the bottom--you probably will have to either run a board along the bottom of the fence (like horsegirl mentioned) or run a strand of electric wire on the inside of the fence (I've never tried this but have heard others have had success with this).
If you do want to try to do the wire as you first mentioned, you'll have to invest in an electric fence charger (and you'll need relevant materials--ground posts, wire insulators, etc.) They will squeeze through the wire if you don't electrify it. And keep in mind that some may squeeze through
anyway. Goats can be tricky--One of my small pastures is enclosed in 5-strand high-tensile electric wire (originally for horses) and one of my does will stand next to the charger and listen for the "clicks" that the electric pulses make--then she squeezes through between pulses so she doesn't get shocked.
It's not a huge issue for me because predators aren't a problem here and when she escapes she's still in a relatively enclosed area.
Of the two options you mentioned, the woven wire really is the more suitable fencing material for goats (as long as you make sure that they cannot get out underneath of it). Not only is it more effective in keeping goats in, possibly more importantly if it is well-constructed it will keep what you don't want (predators, dogs)
out.
I have both types on my farm for my goats. My favorite is by far my fence with 2 X 4 welded wire. We put it up behind an existing 3-board wood fence and then added a 4th board along the bottom, attaching the fencing to that as well. This makes it impossible for the goats to push out underneath. The whole thing looks nice, too!
ETA: I think I was posting at the same time as about 4 other people....