I recall the earlier version with Gene Wilder from my youth although I never saw the film from start to finish for some reason. Having done so I have to say the whole thing really worked very well. The characters were nicely portrayed and Gene Wilder's version of Willy Wonka was like a mad professor. Considering it was 1971 made this had loads of colour and the action sequences or special effects were pretty good for the time.
I never saw the Johnny Depp version until now and it is (typically for a Tim Burton release) a darker piece of film but no less brilliant than it's predecessor. Depp's portrayal is much more sinister in places and there is a more rounded story of Wonka's family past (replaced in the Wilder film it seems by the gas-y drink scene). Truer to the book, too, this had it's own brilliance compared to the 1971 film even if the soundtrack occasionally overpowered the dialogue.
If Dahl's most notorious children's book was a good read then watching both of these films is a must, even if just to compare the interpretations over the 35 years gap between each being made. Great family films, both and very entertaining for a light afternoon film session. Very enjoyable and recommended.