To make gunpowder you need charcoal, saltpeter, and sulfur. Charcoal is easy to make. Saltpeter comes from the droppings of bats and birds. Where did the sulfur come from?
Generally sulfur was gotten via mining. Most famous were the sulfur mines of Sicily, but most salt domes have small associated deposits of elemental sulfur as well. Any volcanic area will have veins of elemental sulfur. So Europe and the Mediterranean had plenty of sulfur deposits.
In addition to those large commercial sources of sulfur, sulfur is a very common component in all kinds of rock, including ore bearing rocks. So plenty of sulfur was produced as a byproduct of mining for other minerals. That's actually where most modern sulfur production comes from, it's leftover dross material, especially from hydrocarbon extraction.
This meant that virtually everyone had some small source of sulfur as sulfides and sulfates are found everywhere.
As a follow-up - I've a feeling I remember reading somewhere than a crucial ingredient in early gunpowder was piss. Can this be true, or is my brain making up nonsense again?