R3 or R5 with the battery mounted on its side I will guess. Replace the complete leads with new ones, from the control board connectors to the battery, and check the battery voltage is under 14.0V on float charge ( battery charging for at least 4 hours with no gate operation). If over 14V change the power supply, they tend to get wonky with age, and will either have a higher output voltage with some ripple on it, or a low output, depending on which capacitors died first.
The vaseline on the connectors is good ( I use a very nice white grease though, which is very good at water repelling as well, but it is rather expensive as it only comes in 2 sizes, 20l and 205l), just make sure you take the new leads and put a little blob inside the spade side, plus crimp the spade tighter using some gentle pressure from pliers, so the connector is a little stiff going on, and makes good contact. The acid venting from a battery being slightly overcharged ( the charger is supposed to have temperature compensation but this is often a little optimistic) will corrode the spade connection which is closest to the outside air as the gas escapes, and this is the negative terminal in these. Plus if there is poor contact there will be heating which accelerates the action of the corrosion along with it being closer to damp outside air.
Same gate motors, though the ones I have at home are decades old, and as it is a complex we went to a separate control box and a 30AH battery for backup as well. At work the R5 ate the lead after 2 years, a new one ( at least new to the gate, it was originally a Samsung aircon loom with 1/4 spade connectors in sleeves on the one end, and good ones at that) with a clean up of the battery and tensioning of the contacts kept it perfect for over 5 years now, though the battery tends to get changed every 4 years with the rest of the UPS batteries, as it is one of the old ones being repurposed to lower duty use.