Strictly speaking Star Wars falls under the specific genre or category named science fiction, indeed. However, science fiction is a genre which came from fantasy, fantasy came from terminology of fiction. Fiction is all that is 'not real' or fantasised or 'made-up'.
So Star Wars would fall specifically more under science fiction, but under the waaayyyy broader sense fantasy or fiction for an ever broader terminology. However, it would be indeed odd if you would mention nowadays it falls under fantasy. As HellEye stated the fantasy genre is more used to say it's revolving around dragons, magic swords, elves etc. xD
(Although aren't lightsabers basically magic swords

)