We find an instability resulting in generation of large-scale vorticity in a fast rotating small-scale turbulence or turbulent convection with inhomogeneous fluid density along the rotational axis in anelastic approximation. The large-scale instability causes excitation of two modes: (i) the mode with dominant vertical vorticity and with the mean velocity being independent of the vertical coordinate; (ii) the mode with dominant horizontal vorticity and with the mean momentum being independent of the vertical coordinate. The mode with the dominant vertical vorticity can be excited in a fast rotating density stratified hydrodynamic turbulence or turbulent convection. For this mode, the mean entropy is depleted inside the cyclonic vortices, while it is enhanced inside the anti-cyclonic vortices. The mode with the dominant horizontal vorticity can be excited only in a fast rotating density stratified turbulent convection. The developed theory may be relevant for explanation of an origin of large spots observed as immense storms in great planets, e.g., the Great Red Spot in Jupiter and large spots in Saturn. It may be also useful for explanation of an origin of high-latitude spots in rapidly rotating late-type stars.