I would call it fantasy, but not science fiction. There isn't any mention of science being involved in Herbie being sentient. I'd say it's more implied that it "magically or miraculously happened." Therefore, I'd classify it as fantasy.
If there's not even a vague hand-waving science explanation, then we can't just assume one. Could just as easily assume a wizard did it. Or that he's possessed by the ghost of Ferdinand Porsche.