Merlin was probably one of the earliest wizards in the Harry Potter universe. He was considered a gifted wizard. While it is impossible to be absolutely sure that Merlin was more powerful than Dumbledore, it is safe to say that both of them had their strong and weak points. Merlin may have had a lot of ancient wisdom due to his time period, while Dumbledore might have had the advantage of modernity and having lived after Merlin's time. There is no doubt that they were both exceptional wizards each, one of a kind.