It depends on how you're judging. In a straight fight with no weapons or power-ups, Ganondorf wins easily. But give them weapons and power-ups, and Dr. Robotnik (Eggman) takes it just as easily.
As for who's the better character overall, that's a closer call. Ganondorf has a rich backstory and depth, though his ultimate motives are often left vague. Eggman also has plenty of depth, but his goal of turning the world into Eggmanland is a clear, logical villainous ambition—which gives him a bit of an edge in that department.