I have swollen and itchy eyelids. Will this go away by itself? Should I go to the doctor to get it checked out?

Yes. Yes, you should see a doctor to have it checked out and no it is not likely to go away by itself unless it is caused by something you are no longer exposed to.
Yes. I would go to the doctor to get it checked. It may be something simple like allergy, or it could be something more serious like blepharitis, which could have effects on the cornea and your vision.