Gunpowder is often referred to as the source of Gandalf's fireworks. But, it is never clearly stated what Gandalf's fireworks were made up of.
The fireworks were by Gandalf: they were not only brought by him, but designed and made by him; and the special effects, set pieces, and flights of rockets were let off by him. But there was also a generous distribution of squibs, crackers, backarappers, sparklers, torches, dwarf-candles, elf-fountains, goblin-barkers and thunder-claps.
A more likely possibility is that the fireworks were made with the power of Narya, the Ring of Fire, but that too is not confirmed.
Another reference to gunpowder is through Saruman's inventions.
Even as they spoke there came a blare of trumpets. Then there was a crash and a flash of flame and smoke. The waters of the Deeping-stream poured out hissing and foaming: they were choked no longer, a gaping hole was blasted in the wall. A host of dark shapes poured in.
‘Devilry of Saruman!’ cried Aragorn.
It is never said that this 'bomb' was made up of gunpowder or Saruman's magical capabilities, but Peter Jackson used the former in the 2nd film.
Of course, this is completely non-canonical and doesn't prove that gunpowder exists in Tolkien's Middle-earth.
Also, when Isengard was attacked by the Ents:
‘Isengard began to fill up with black creeping streams and pools. They glittered in the last light of the Moon, as they spread over the plain. Every now and then the waters found their way down into some shaft or spouthole. Great white steams hissed up. Smoke rose in billows. There were explosions and gusts of fire. One great coil of vapour went whirling up, twisting round and round Orthanc, until it looked like a tall peak of cloud, fiery underneath and moonlit above. And still more water poured in, until at last Isengard looked like a huge flat saucepan, all steaming and bubbling.’
Also, during the Siege of Gondor:
But the engines did not waste shot upon the indomitable wall. It was no brigand or orc-chieftain that ordered the assault upon the Lord of Mordor’s greatest foe. A power and mind of malice guided it. As soon as the great catapults were set, with many yells and the creaking of rope and winch, they began to throw missiles marvellously high, so that they passed right above the battlement and fell thudding within the first circle of the City; and many of them by some secret art burst into flame as they came toppling down.
But again, though speculated, it is never stated in these 2 instances that it was gunpowder,
Therefore, is it even plausible to say that gunpowder exists in Middle-earth?
Note: This is not a duplicate of: Why wasn't gunpowder more common in Middle Earth? I am asking about the evidence concerning the existence of gunpowder. Whereas the accepted answer in the linked post merely describes the existence of magic and it's different forms in Tolkien's legendarium and does nothing to describe the existence of gunpowder. The answer by Dronz is reasonable, but it seems speculative and there was no evidence given.