I don't think that gunpowder represents much threat for game concepts. It does not necessarily implies creation of guns and cannons, which certainly would be out of the concept of this game. It could be very useful for creating artificial cave-ins to remove unwanted mined out areas. And, of course, it could be used for traps. I think that maybe it could be renamed into something different than 'gunpowder' to remove associations with guns and make it sound more fantasy-like.
I think, that gunpowder production would fit very well into game process. To produce saltpetre, dwarves would designate some space for nitre-beds organisation. All organic refuse would been taken there (corpses, rotting food, ets.), mixed with wood ashes and left for a season or two to ripe. After that, nitrified substance would be taken to ashery for leaching and as a result, we would get saltpetre. Except for making the gunpowder, it also could be used as fertilizer along with potash.
The charcoal for gunpowder is not a problem and the sulfur.. Well, it is already present in some ores that dwarves mine (galena and sphalerite). They could produce sulfur at kiln or as a by-product of smelting named ores. The excesses of sulfur could be used to reduce the numbers of vermin in the fortress.
Then all ingredients for gunpowder would be mixed at the alchemy lab. I think, the most suitable would be the German standard - 4:1:1. So, we would need 4 bars of saltpetre, 1 bar of sulfur and wood charcoal to get 1 full barrel of gunpowder. And then, finally, we would be able to make noble-exploding rooms.
*Sigh*. But that is only a dream, i afraid..