The biblical view of reality ... is paralleled by the pagan worldviews [ANE worldviews -DHC], which both predate and postdate the Bible. The ancient world understood that there was a supreme God,with whom all things originated and who held all authority and yet was relatively inactive in human affairs. But they also understood that there was another god, the storm god, who was indeed active among both divine and human affairs. A constitutional monarchy may present an analogy, in which the monarch theoretically holds authority and instructs the prime minister to form a government, but it is the prime minister who is truly active, who "gets things done." So it was in the ancient world with Enlil, Baal, Zeus, and Jupiter. ... In any case, the parallel that concerns us now is that which obtains between the pagan divine assemblies and the biblical assembly of angels, or "sons of God" (Job 1-2 RSV). Holy angels refuse human worship (c.f. Rev. 19:10), but fallen angels clearly do not, as Moses and Paul have indicated. It seems reasonable to agree with these biblical writers, and such agreement leads us to understand that the common pagan theological structure presented above is a theological counterfeit not only endorsed by all ancient pagan thought, but imposed upon the ancients by the misleading inspiration of fallen angles (or, to use Paul's words to Timothy, "doctrines of demons," 1 Tim. 4:1 RSV). [Jeffrey J. Niehaus, Ancient Near Eastern Themes in Biblical Theology (Grand Rapids, MI: Kregel, 2008), 180-1]
From the time of German liberal Hebrew scholars like Hermann Gunkel and Friedrich Delitzsch, the discovery of the ANE (Ancient Near-East) has undermined the faith by postulating that much of the Old Testament historical narratives (especially those that deal with "pre-history") are myths borrowed and contextualized from the other ANE cultures surrounding Israel. Similarities between for example the Gilgamash Epic and the Biblical Flood account have been pointed out and used to undermine the truthfulness of Scripture. Even more subtle are the comparisons between storm imagery in the Psalms with the Ugarit Baal Epic, in an attempt to link OT spirituality with Canaanite/ Phoenician religion.
Yet the similarities are indeed present, and anyone dealing with the OT need to wrestle with that issue. German liberal scholars of course took it to mean that biblical sources borrow the myths of their neighbors, but certainly that should not be the only option possible. Great antiquity of a written source only establishes that the myth (e.g. Gilgamesh) existed at that time, but it does not establish that the "younger" tale was not present then, especially once we understand that oral culture was much more present and important in the ancient world. In other worlds, assuming priority based upon antiquity of a written source is ultimately an argument from silence, for there is no way to disprove the biblical account was present but unwritten back then.
In his book on ANE themes in biblical theology, Jeffrey J. Niehaus went through the parallels between the ANE cultures and religions with OT culture and religion. Niehaus basically postulated that the parallels are due to common grace to the pagan nations (pp. 29-30), thus God uses these common forms to instruct Israel in true religion. At the same time, Niehaus argues that it is the distorted inspiration of demons that lies behind the pagan religions (pp. 180-1). It seems to me that the two given reasons do not cohere with each other. Are the pagan religions part of God's common grace, or demonic deception? And why should God utilized demonic forms, as it were, to instruct Israel in true religion?
It seems to me that, if one takes a presuppositional approach, that we see true religion as being there from the beginning. As such, the false pagan religions of Sumer, Egypt, Babylon, Ugarit and others, are demonic distortions of the religion they once had. In other words, it is not as if they were grasping in the dark and had "evolved" their religions to this "higher" level. Rather, theirs were a devolution of the original religion they had learned from Noah. Therefore, similarities are due not to borrowing of Israel from her neighbors, but rather because paganism devolved from the true religion of Noah. Israelite religion, being a divine restoration and also an advancement of true religion, would therefore look similar to the ANE religions, since they both historically were from the same source.
Thus, instead of seeing Israel as borrowing from her pagan neighbors, it is better to see Israel as preserving the truths that the pagan religions have distorted. That includes the storm imagery, while the primal gods of paganism were probably originally meant to represent the true God before various cultures distort what they knew about the Noahic religion into paganism.