Giving mass to an object is referred to as the Higgs effect. This effect will transfer mass or energy to any particle that passes through it. Light that passes through it gains energy, not mass, because its wave form doesn't have mass, while its particle form constantly travels at light speed.