The emotion chip was a device created by Dr. Noonien Soong to give Data the human emotions he lacked, which Data finally installed in 2371.
Soong designed the chip as a gift for Data, and in 2367 he summoned the android to give it to him. Lore arrived as well, and it was Lore who received the chip, shortly before Soong died, leaving Data without it.
Lore later used the chip to manipulate Data's feelings during an alliance with a band of former Borg. After Lore was deactivated in 2369 Data recovered the chip but hesitated to use it. He installed it in 2371, experiencing fear, joy and grief, and eventually learned to control it.