I’m going to say - probably safely edible in small quantities.
Elemental Sulfur is (according to wiki) non-toxic, and saltpetre is used as a thickening agent in some african cooking traditions. Charcoal/carbon is also nontoxic.
The taste, however, may leave something to be desired.
And the after-affects of the sulfur may be … disconcerting. Farts that burn holes in your pants (due to sulfur oxidising and forming sulfuric acid) may be only the start - hydrogen sulphide may be produced by bacterial action in the gut, and is pretty odorous.
Potassium nitrite, AKA saltpeter, is the probably the single most toxic component of black powder. LD50s for it are around 2000-3000mg/kg in rodents. Chances are whatever concoction you would add black powder to would become unpalatable long before it would become acutely toxic.
As an aside, orally-ingested saltpeter was once believed to be a useful libido-lowering agent, leading some to joke that leftovers from military ammunition supplies were put in mess hall food to keep soldiers focused on their regimen rather than resorting to homosexual horseplay.
Well, here is a MSDS for black powder (PDF); it doesn’t say much on the hazards of ingestion other than to induce vomiting if swallowed. As for the ingredients, the main ingredients are either sodium or potassium nitrate; which can cause sodium or potassium poisoning respectively, although the LD50s for these from their respective MSDSs are on the order of 1-2 grams per kg, so a 70 kg human would have to ingest around 70-140 grams for a fatal dose (less just to get sick, say maybe 10% of that as an upper limit, 7-14 grams or around 10-20 grams* of black powder, which is around 70% nitrate). The other ingredients are charcoal and sulfur, possibly a trace of graphite, which are relatively non-toxic, (in the relative amounts, the MSDS for sulfur says that small amounts won’t cause health effects; they are also relatively insoluble, unlike the nitrates, and make up only 3-6 grams of the 10-20 grams calculated from the nitrates alone).
*Just an assumption based on the LD50 and what amount might start to make you sick. Also, as a check, assuming that only the Na/K is toxic, you can compare it to table salt; e.g. NaNO3 is 27% while NaCl is 40% sodium by weight and people regularly consume 5-6 grams of salt (some even more, up to 2x this much) a day, equivalent to the amount of sodium in 7.4-8.9 grams of NaNO3, which falls within the range I estimated as a non-toxic dose (mind that ingesting it all at once isn’t the same as over 24 hours).
Neither potassium nitrate nor potassium nitrite is used much any more for curing meats. Sodium nitrate and sodium nitrite are much more common. I’m not sure why this is, since the LD50 for sodium nitrite is a lot lower than the LD50 for potassium nitrate (180 mg/kg vs. 3750 mg/kg in rats). Maybe it’s different in humans.
Anecdoteish: I seem to recall hearing somewhere (probably the Napoleon 101 podcast) that French soldiers in the Russian campaign, when they were starving and reduced to eating their horses, used gunpowder as seasoning. I suspect it would taste generally salty, with some sulfur.
Given that several good answers to the advisability of eating black powder have already been posted, I’d just like to note that you can eat just about anything…at least once
Wasn’t this mentioned in the film The Edge, the one about Alec Baldwin & Anthony Hopkins stranded in the wilderness & pursued by a huge bear. Hopkins was supposed to be a super-rich, super-intelligent guy whose knowledge allowed them to survive. After finally killing & eating the bear Baldwin says, “I wish we had some salt”, and Hopkins mentions that they used to use gun powder for seasoning. To which Baldwin just replies, “I wish we had some gun powder”!