Firstly, weapon technology is difficult to research because it is usually secret and gunpowder is no exception, so most important evidence is purely indirect; you have infer the invention from other evidence, such as metallurgical evidence.
Secondly the idea that gunpowder came by the "silk road" or that it originated in China, Mongolia, Arabia or other such places are fanciful ideas without basis. Due to the mystery of the subject, it is human nature to ascribe an exotic origin to it, so people like to imagine all sorts of distant, exotic explanations for it. For example, in one post above they mention "saracen powder", a completely invented term of modern origin that has no antiquity at all.
The first possible European mention of gunpowder is in the writings of Roger Bacon circa 1280, but these mentions are very vague and taken in the context of the wide variety of related pyrotechnical alchemy, cannot in my opinion be considered to be inventive. Note that gunpowder is not actually a powder, but is actually composed of very small pellets and producing these in a way that they can be used as a ballistic propellant is a non-trivial technology, which I doubt Bacon had any knowledge of, based on what I have read of his writings.
Although there is no certain ideas of the origin, it is very likely the first practical experiments and developments took place in Prague. Whether the supposed person Berthold Schwartz existed or had anything to do with it is unknown, but his association with Prague is suggestive. What is definitely known is that Prague was the first center of gun technology. For example, both the words "pistol" and "howitzer" are of Czech origin. Although the first significant use of guns, at the Battle of Crecy (1346), was in France, it seems likely the technology used was of Czech origin. Also, the siege gun used by the Ottomans to reduce Constantinople in 1453 was of Hungarian make, however, the Hungarians received this technology from Prague. The first widespread and decisive use of gunpowder was in the Hussite Wars (1419-1434) in Bohemia, once again arguing for a Prague origin.
In general, all of the early production and use of guns that I have researched always have a trail that reaches back to Prague, therefore, in my opinion the invention must have occurred first in Prague in approximately 1325-1335.
Concerning the "Chinese" origin idea; I am not sure how this got started, but it is a modern idea (20th century) which appears based on some very vague 17th century Chinese encyclopedia entries. These encyclopedias were highly collated works that combined many different facts and often ascribed false antiquity to various sciences. Even the entries that supposedly refer to gunpowder are highly ambiguous and could be interpreted in many different ways.
What is definitely known is that the first recorded introduction of cannon to China was in 1621 when the emperor requested three cannon and crews of the Portuguese resident in Macao, and in 1636 to fight certain of the Manchus then invading the Jesuits were asked by the emperor to teach the Chinese the casting of cannon. The next development was that Ferdinand Verbiest directed the acquisition of some hundred small cannons for the emperor in addition to his construction of astronomical instruments for them. That the Chinese (and Manchu) had no prior knowledge whatsoever of guns or ballistic propellants is evident from the accounts of the Portuguese.
Comments on the Battle of Mohi (1241)
In another answer to the question it says "rocket-like weapons" were used at the "Battle of Sejo" by Mongols, a "fact" obviously pillaged from NASA's completely unsourced "history of rocketry". First of all, the battle is usually known as the Battle of Mohi which took place near the Sajo river, not the Sejo river. Secondly, none of the European accounts of this battle mention any "rockets" whatsoever. Thirdly, the Chinese accounts, which are only known from books written HUNDREDS of years later THOUSANDS OF MILES away in China, mention only fire arrows and "fire pots", which apparently is a reference to naptha bombs, a technology known to the ancient Greeks and Persians. Transforming hard-to-translate Chinese accounts of fire arrows, which are obviously second-hand accounts originally written in Mongolian into "rockets" is a typical example of how obscure sources are re-interpreted to create exotic origins for technology. This wild exaggeration is a typical example of how 20th century historians, most of whom cannot even read Chinese at all, uncritically have created this false mythology of Chinese (or in this case Mongolian) technology.
It suffices to say that if actual rockets had been used with effect at the Battle of Mohi, the European accounts of the battle would have mentioned them.