I was right about capacitors, partly. Some models of ATS have a center position, in which they wait until either supply is stable. In order for this to work, the ATS is powered by a capacitor during this time. For this particular model, it takes 10 minutes for the capacitor to charge. Based on this long time, I suspect it's some kind of supercapacitor.
And it's possible to have the ATS' own battery (or supercap) send the signal and power to start the generator. And the generator has its own built-in battery too in that particular setup (the charge needed to start is substantial). So yes there are batteries or supercaps involved in the transition, but they may be built-in the devices involved.
A more serious setup puts UPS after the ATS so the consumers don't lose power while the transition happens.
Someone even wrote a paper on The importance of the generator starting battery.
Re: "Do you mean that ATS can be supplied from the built-in battery of the generator?" Some ATS models normally do that, for example:
M2G units require a DC power supply which is normally taken from the generator’s starter battery. If connection to this battery is not convenient then an alternative must be found, otherwise the ‘integrated DC supply’ package must be added to the ATS panel.
Actually the whole bit on ATS types in that brochure is worth reading:
There are more details on the internals of a cheap/household ATS in this paper. That one needs/uses a 12V battery.
For some [more expensive] ATS units, no-external-DC-power-requirement is the standard option. This one from ABB doesn't detail how it powers its own circuitry, but it says
The new ATS family is designed to work without auxiliary
power supply. Auxiliary power supply is only required when
Dialogue Modbus RS485 is used or in networks with rated frequency of 16 2/3 Hz.
It probably has internal battery or supercap but its charging circuitry needs at least 50Hz to operate; that ATS is not rated for operating on anything in between 16.7Hz and 50Hz mains frequency.