<Presumably Lucas knew of Gandalf even if he'd never read LOTR, but
it makes more sense that Gandalf and Obi-Wan are independent
of the greater archetype of wizard?
Yeah, but we know that Lucas read The Lord of the Rings, don't we? I
would say that Obi-Wan is constructed from Lucas's vague memories of
things that he read or saw, including Tolkien.>
The first thing I thought of upon my original viewing of Obi-Wan's
fatal duel with Vader was, "Hey, that's Gandalf and the Balrog!" My
next thought was that Obi-Wan would be back sooner or later. Which
indeed occurred, although not in a physical body like Gandalf.