Many characters from the Gesta Danorum have analogues to "history" so who does King Gewar correspond to?
I think it's likely that you haven't gotten an answer because it is extremely hard to say. When one is attempting to study Scandinavian society via contemporary sources, especially before the 11th century, the written sources we have come from European, Byzantine, and Muslim sources. The Scandinavian Sources we do have are generations removed from the fact, and while extremely valuable, cannot be relied on entirely to establish a chronology, and since they were written after the Christianization, cannot be expected to be unbiased accounts. The term King itself, in a Scandinavian context is completely inextricable from Christianity, and nation-states did not exist in any real sense until well into the 10th century. This all makes trying to compare King Gewar to a known historical figure tricky. However, how Gewar dies is consistent with the death of Godfred of Denmark, who was killed by one of his bodyguards. His primary achievement was the theft of an entire trading town from Charlemagne. He essentially transplanted all of the traders from the Frankish town into his purpose built town called Hedeby, thereby stealing the center of Baltic Sea trade. He also constructed the Danvirke.
The first bit was long winded, but I consider a disclaimer to be somewhat necessary in this situation. Hope this helps!