Your eyelid may be swollen because of an infection or blockage of an oil-secreting gland. This condition is called a chalazion. It usually looks like a red pimple-like area along the top or bottom of the eyelid. You may also have a more dangerous diagnosis, called orbital cellulitis, which can occur when an infection of the eye migrates into the eye socket. Pain, eyelid discoloration, and swelling along with fever, the eye bulging out or protruding, and difficulty moving the eye are common with this type of infection.