if the gym that you go is a public one, I would recommend maybe taking a few days off since you could easily transfer it to other gym goers by touching the equipment if your hands are contaminated from rubbing your eye. What's worse, with a weaker immune system, bacteria can cause infection to develop within the eye. My advice is that do body weight exercises at home until you are no longer contagious.
Although pink eye is common and not serious, you also should take good care of your eyes. Without medical treatment, pink eye will last 4--7 days. And during your pink eye in a time for recovery, you'd better stay at home and have a good rest. No smoking, no drinking. Don't let any germs and sweat into your eyes, and wind may let your pink eye much worse. So based on these factors,do not leave your house until you are good.
You can, but you had better not do that. Pink eye is a common acute epidemic conjunctivitis which is caused by bacteria infection and it is characterized by acute attack and powerful infectivity. Its main route of transmission is through touch. Once a healthy person touches the things stained with the eye secretion or tears of the one with pink eyes, such as towel, handkerchief, washbasin, water, etc. or he shakes hands with the one with pink eyes and then rub his eyes with his hands, then he can be infected with pink eyes. So I advise you not to go to the gym, because the gym is crowded with people and you will sweat after doing exercises, thus you need to rub your sweat with a towel. Furthermore, it is likely that you meet your friends there, once you shake hands with them unconsciously, they can be infected.