Pegmatites are predominantly granitic in composition but not necessarily. The definition of a pegmatite says nothing about the composition. They are simply very coarse-grained igneous rocks.
It is generally well known that the slower the rate of cooling the coarser the rocks will be. Hence, pegmatites should be rocks that cooled especially slowly? Actually, just the opposite is true. Pegmatites most likely cooled relatively fast because they are usually found at the edges of batholiths (cooler host rocks are nearer). It is the low viscosity of magma that makes them coarse-grained. Such a magma contains lots of volatile compounds (mostly water) that break the links between silica tetrahedrons and thereby make the magma less polymerized which enables large crystals to grow.
Pegmatites are mostly granitic because granitic magma contains much more water than magmas with different composition. It is especially true if the granitic magma formed by the melting of former metasedimentary rocks that contain lots of hydrous minerals. gabbroic magma usually contains much less water because of obvious reasons — its source rocks (peridotite mostly) contains very small amount of volatile compounds.
However, sometimes, for some reasons, some parts of gabbroic intrusions do solidify as pegmatites. I saw a nice example of a gabbroic pegmatite in Cyprus. These rocks represent the lowest parts of the oceanic crust which host gabbroic batholiths that feed the sheeted dike complex above. Through sheeted dikes magma moves upward and if it successfully makes its way to the seafloor, solidifies there as a pillow lava (gallery of pillows from Cyprus).
Gabbroic pegmatite at the Loumata River Valley.
White is plagioclase, black is mostly augite (pyroxene).