The original idea with the Gatling AFAIK was that because the metal alloys of the time did not allow for high sustained rates of fire, due to heating and warping of the barrel, or even the risk of ammo self-ignitions, they simply added multiple barrels to allow each barrel to cool down. A lot of the Gatling guns used in the Civil War were hand-cranked, but later models then and today typically are electrically powered. There are also gas operated gattling guns which use recoil to provide motive power like the Soviet GSh-6-30. It is not like, say, revolver guns did not exist before, with the so called coffee mill guns (like the Agar gun). But like I said due to materials issues they had a lower rate of fire. The Maxim single barrel gun was not only self-reloading but it also had a water cooled jacket around the barrel which had to be drained and refilled once it got too hot. Later automatic weapons used metal heat dissipators, more heat resistant metal alloys, and lowered rates of fire to eliminate the need for water cooling.
Another automatic weapon principle which is sometimes used in high rate of fire guns, besides the gattling cannon, and revolver cannon, are weapons which use the Gast principle. It is basically a twin barreled cannon in which each barrel fires alternatively in a sequence and uses recoil to reload itself. Examples of this are the Soviet GSh-30-2.