Generally if your battery isn't working first thing in the morning but works later in the day when the sun is on your solar panel then you will most likely require new batteries
Try charging your batteries
If your batteries are 3 years or older replace them
If you have a multimeter, test the batteries under load while trying to operate the gate
Under loack check your solar regulator battery lights to see if they are mostly solid. If they drop to one or it starts flickering then replace or charge your batteries depending on their age
We have hard wired and wireless push buttons so we will try to cover both here
Hard Wired Button
Check for insect infestation in your push button housing
Check cabling by removing the cable from the push button and tapping them together - this should activate the gate. Re wire to the push button and see if it works.
Try contact spary or WD40 on the internal connectors and see if this helps
If the above help doesn't reslove the issue you will need a new push button.
Wireless Button
Check for insect infestation in your push button housing
Replace internal battery
Check wiring and connection from small internal pcb is good
If the above help doesn't reslove the issue you will need a new push button.