Gratuitous ARP, is the ARP that is used to inform the network about IP to MAC Mappings after a change. It is sent as Broadcast message to all the nodes in the network.
Because of network configuration changes or any failure, Gratuitous ARP is used to inform the network nodes about the situation after this change. There can be various scenarious for this.
For example, After a manual MAC address change, Gratuitous ARP provide to inform other nodes about the new MAC address. And the IP to MAC Mappping.
As you can see below, at the beginning, IP to MAC Mapping of the devices are know.
After a change, this can be manually MAC address changing, Gratuitous ARP is used to inform the other network nodes about the new MAC address of the device. According to this information, IP to MAC mapping is updated.