That greater-than-90° motion for pivot #1 makes this somewhat involved. If you can get the pivots points on a straight line, it is trivial.
I realize the gray lines show the travel paths, however I am assuming that the two horizontal lines would comprise a physical track for the traveling gate joints, and also enclose a chain and a cable (or 2 chains).
Anyhow, here goes.
Referencing your video,
View attachment 357798
Starting at top left, label the fixed pivot #1,
the middle pivot #2
then #3
Motive power at the right end of the track.
Two roller chains needed for unfolding (or cable + roller chain):
Rotate links #1 & #2:
A cable/chain inside the track, with an idler pulley in the track where pivot #3 enters the straight track. End of rope/chain attached to gate near pivot #3 and to motive power at right end. Pull until pivot #3 enters track
Rotate all links, straightening gate:
Continuous Roller Chain inside track with idler to left of where point #3 enters track.
Pivot #3 has a sprocket that engages roller chain. Sprocket turns drive axle that straightens pivot #3 (unfolds last segment of gate).
When last gate segment hits rotation stop, the entire gate starts extending to Closed position.
Refolding is left as an exercise for the reader.
Interesting problem.
Have Fun,
Tom