When Ken Annakin died in 2009, George Lucas made a statement through his publicist that he had not named his character after the director. However, a 2006 Issue of Venice Magazine features an interview with Annakin himself which confirms that both points of view might be correct... from a certain point of view thanks to a suggestion from Alec Guiness:
Speaking of George Lucas, how did you feel when he named the character of Anakin Skywalker after you?
(laughs) Well, I asked him about that, but I’ll tell you: he never asked me. He never invited me to the first showing (of Episode One). Apparently it happened through Alec Guinness, who was working at Pinewood Studios on the first Star Wars and every day, would pass by my office door, which had my name on it. So it was Alec who suggested it to George. They dropped one ‘n’ from the spelling, and there it is. I didn’t mind it so much when Anakin was a good character, but now that he’s a bad character, I’m not so keen on it! (laughs)