1. They are 12-volt cells
The A27, printed 8LR732, is a slim 12-volt alkaline cell about 8 mm across and 28 mm long. It is also sold as 27A or MN27, and all of those names mean the same battery.
2. The A23 is the fatter one
The A23, printed 8LR932, is 10.3 mm across and 28.5 mm long. Garage door remotes and wireless doorbells usually take the A23, while alarm fobs and gate openers often take the slimmer A27.
3. Note the polarity
The positive end of these cells is the end with the raised nub, and it is marked on the remote. A cell fitted backwards gives a remote that only works from close to the gate.
4. Buy them fresh and keep them apart
These cells lose their charge faster than coin cells. Keep spares in their packaging, away from coins and keys, and buy from a shop that sells quickly.