Yes, you can use one 24V battery instead of two 12V batteries. It is fully compatible with your 24V sliding gate motor and works well with your 40W solar panel for charging.
This VEVOR 24V 50Ah LiFePO4 battery has larger capacity, more stable power supply, and can solve the low battery alert problem. It is safe to use in a waterproof box adjacent to the gate opener.
By vevor