How has iodine gained electrons?
Two points before we begin:


+ charge means deficiency in electrons.
- charge means excess of electrons.


Now lets come to the reaction you are talking about.


  Two chromium atoms gain 3 electrons each. They go from 0 to 3+


Moving from neutral to +3 charge means it just lost 3 electrons. (Electrons have negative charge.)


  Similarily, 6 iodine atoms go from -1 to 0, thus gaining one electron. However my textbook says that Iodine has lost electrons. How?


Your textbook is right and you're wrong here. Moving from -1 charge to 0 means that an atom just lost an electron (in other words, it lost the excess negative charge it had and now it is neutral).