Hundreds of molecules contribute to wine aroma and flavour, both alone and in combination, though many have not been clearly identified. In 2007, the Australian Wine Research Institute identified that the pepper aroma often associated with shiraz/syrah wines were linked to a compound called rotundone. This is also found in both white and black pepper at high levels and in certain herbs such as bay leaves and rosemary. It has also been found in at lower levels in other grapes including vespalina, schiopettino, mourvèdre and grüner veltliner wines.
This compound is found in grape skins rather than juice and seems to accumulate at higher levels in cooler growing conditions and colder wetter vintages. Winemakers still have a lot to learn about how to manage the vineyards for higher or lower levels of this compound - one project in France found that leaf removal around the fruit zone reduced rotundone by between 50 and 70%. Funnily enough, as many as 20 to 25% of people are anosmic to this compound (a technical word meaning they can't actually smell it, probably due to the lack of the right olfactory receptor).
Humans have around 400 olfactory receptors but each individual has a unique set due to genetic variation, so everyone literally experiences wine differently. This means there's never a right or wrong answer in wine tasting. Another spicy character often found in oak-aged wine is from a chemical called eugenol which is the main flavour and aroma of cloves. It's present in oak and is released into wine during ageing.