Complex sentence: Small gates open when a chair is about to go by and close when a gondola goes by, preventing people from moving in front of a gondola.
Split into simpler sentences: Small gates open when a chair is about to go by, and close when a gondola goes by. This prevents people from moving in front of a gondola.