Actually, if you want the fence to move it needs to be either a func_door, or a func_train. Func_doors are easier in my opinion.
Create a rectangular brush with the fence texture, then make a brush of the same size over it with the clip texture. Make both of them the same func_door, then check "passable" in the flags. That should work.