At the moment of their confrontation, obviously yes. In general, perhaps not; there were some extenuating circumstances at the time:
But Ungoliant had grown great, and he less by the power that had gone out of him
The Silmarillion III Quenta Silmarillion Chapter 9: "Of the Flight of the Noldor"
Ungoliant has been gorging herself on the magic sap of the Trees of Valinor, which has temporarily buffed her strength. Note how she's described while in the process of drinking the Light of the Trees (emphasis mine):
Ungoliant sucked it up, and going then from Tree to Tree she set her black beak to their wounds, till they were drained; and the poison of Death that was in her went into their tissues and withered them, root, branch, and leaf; and they died. And still she thirsted, and going to the Wells of Varda she drank them dry; but Ungoliant belched forth black vapours as she drank, and swelled to a shape so vast and hideous that Melkor was afraid.
The Silmarillion III Quenta Silmarillion Chapter 8: "Of the Darkening of Valinor"
Melkor, in contrast, has put a lot of his power outside himself in the course of his mischief-making, so he's not really at full capacity. This process, incidentally, is what eventually makes him vulnerable and leads to his defeat at the end of the First Age.
Unfortunately, we have very little definitive idea about what, exactly, Ungoliant is, or how some of the things she might be fit into the Middle-earth power structure. With that limitation in mind, it becomes impossible to definitively state which of Ungoliant or Morgoth would have been more powerful in a standard situation.