On foggy days when there is a lot of moisture in the atmosphere, reflective photocells can be easily obscured by a film of moisutrre on the lens. Once open, the gate will not close.
Take a tissue and wipe off the excess moisture from the photoeye and the reflector.
Check the photocell is showing a light and pass your hand over the cell. You should hear a distint click and a light should come on, or go off, depending on the type of cell.
This indicates the cell is working correctly and the gate should close with the timer or a command from your remote.