The solar panel is generating power from the sunlight at maximum 5W of power. The power will then charge up a battery. The automatic gate is actually running with the power from the battery because the solar panel itself is not powerful enough to drive the electric motor.
During the non-sunny day, the system still able to continue to operate the electric motor using power from the battery. The system is designed to work 5 to 7 days without sunlight. However this figure varies depends on the frequency of usage and the condition of the battery.