Superman is vulnerable to magic based attacks; his powers are science based and magic disrupts them. It's why magically enhanced punches from Shazam have knocked him out, lightning from Shazam and Black Adam has hurt him more than regular lightning would, and Wonder Woman's weapons (sword, tiara) have sliced him open.
"I'm not smart so much as I am not dumb." - Harlan Ellison
First off, comics tend to be fairly inconsistent. This is further complicated by the fact that Superman holds back more than almost all other heroes, and under many writers has even more fundamentally dynamic aspects to his power level. Finally, Superman's skill level is not really an essential part of his canon, leaving writers lots of room to portray Superman's skill and intelligence levels in ways that best serve their own story, without much regard to overall consistency. If your Superman cannot fly, you will have to explain why; if your Superman is relatively unskilled in hand-to-hand combat and needs tech help from Steel, you don't have to.
Diana's portrayals can vary in different respects as well, though in recent times they haven't varied as much as they used to.
So the answer to the original question, is that sometimes Diana is a threat to Superman, and sometimes she is not. When the formidability-related aspects of a given Superman portrayal are lower, and this coincides with a formidable portrayal of Wonder Woman, she is logically a threat to Superman in those stories, and is often shown as such.
The circumstances where Diana is a threat to Superman have varied, depending on which characteristics of Superman are given short-shift and which of Wonder Woman's are having a good showing. Sometimes, their raw strength levels are shown as close--either because the writer feels Superman holds back too much or just feels the power levels of the characters are flat out comparable, even when Superman cuts loose. Combine such takes on their relative power levels with a low-skill Superman portrayal and you get a situation where she could definitely take him 1on1.
On the other hand, sometimes Superman is shown as clear and away the most powerful Leaguer, and Diana is in no way shown to be a threat to him. The JL movie comes to mind.