... referring to this diagram for the comparator operation:
**broken link removed**
It looks like when the photo-resistor is non-conductive ... at night ... the comparator output is in the off state, which would create a high LM311 output voltage, which would turn the T1 transistor on ... which would last all night long.
The night-time on state of T1 would discharge the battery during the time when there would be no solar recharging.
It might help significantly if you were to find out how much current flowing through T1 is minimally required to turn on the K1 relay coil. At the present time, there is no limiting resistor in the T1 current path, other than the intrinsic resistance of the relay coil winding. A 1k current limiting resistance inserted at the collector of T1 might be all that is needed to bring the design to within some sort of reasonable operating parameters. If 1k Ω is too much, try 500 Ω, 250, or 100. Does the T1 transistor feel hot to touch when it is on? If so, it could definitely use some additional resistance in its collector to emitter path.
edit ...
Was going to say try switching the + and - connections to the LM311, so that T1 would be turned off at night, but not sure that would work.
... Don't think I completely understand the motor and door cycle operation at this time.