Minecraft wiki entry for End_Gateway_(block), associated text: They generate naturally as part of the End gateways. Each time the Ender dragon is defeated one End gateway generates around the central island in the End, up to 20 times. Activating each of them generates one more gateway among the outer islands. Thus, a total of 40 End gateways or End gateway blocks can be generated in a world.