I think I have a problem, my professor seems to have a crush on me.
Really? How do you know your professor has a crush on you?
He always smiles and me and wants to spend time with me, but it seems like he's attracted to me.
It's really inappropriate for a teacher to have a crush on one of their students. Teachers are supposed to teach and protect their students and him having a crush on you could get him in serious trouble. I hope if anything happens, you're able to dispel any notion of you being interested back.
I'm not sure if this will affect my grades or if I should drop the class. I need this class for my major.
Don't drop the class if you need it, but try to discourage the relationship. Sit in the back and try not to make contact with him. If he makes you uncomfortable tell someone at your school about this and have them help you.