As others have pointed out, the supposition really isn't true anymore. Manuals have 5 to 7 forward gears, automatics typically have between 5 and 10 forward speeds.
But, up until the early 2000s, it was true that most automatics had 4 speeds and most manuals had 5. In the 70s, most automatics had 3 speeds and most manuals had 4-5.
The reason an automatic can perform as well or better than a manual with fewer gears is the torque convertor. The convertor effectively has its own "gear" multiplication ratio and it depends on the output shaft speed... so at the "bottom" speed of each transmission gear (just as soon as that gear applies, when road speed in that gear is lowest) the torque convertor maximizes its torque multiplication and slip. As the road speed within that gear increases, the torque convertor "tightens" (slip decreases, torque multiplication decreases). So each forward gear is effectively ratio variable within its range. Torque convertors are wonderful gadgets. But as long as they're slipping and multiplying torque, they're also wasting a little power, so manufacturers added convertor lockup clutches so that (depending on how hard the driver is demanding acceleration) the convertor can completely lock up earlier or later within a gear range, and can also partially lock, reducing fluid pumping losses.