All igneous rocks are divided into two groups. The first one is called intrusive (means "inside"). These rocks are usually formed into the Earth's crust. The second group is called effusive (means "outside"). The intrusive rocks solidify slowly inside the crust so they have coarse-grained texture, while the fine-grained effusive rocks solidify rapidly at the Earth's surface. For example basalt is an effusive analogue of gabbro. The rocks which are mentioned above have almost the same composition but gabbro is formed under the surface inside the crust and has coarse-grained texture.
The another kind of classification is based on rock's composition. All igneous rocks can be devided into felsic, intermediate, mafic and ultramafic rocks. The felsic rocks (e.g. granite) contain much silicon, while ultramafic (e.g. peridotite) rocks contain least silicon. Basalt and gabbro which are mentioned above are mafic rocks.
By the way, the composition of a rock defines its solidifying temperature. Ultamafic rocks have the the highest solidifying temperature while felsic rocks have the lowest one. For example ultramafic peridotite magma contains least silicon and is very viscous. That's why peridotite solidifies slowly inside the Earth surface. It can't reach the surface because of its viscosity. And that's why peridotite has not effusive analogue as gabbro.