A Gratuitous ARP is an ARP packet sent by a node in order to spontaneously cause other nodes to update an entry in their ARP cache.
It “MAY use either an ARP Request or an ARP Reply packet”
Sender IP and Target IP are both “set to the IP address of the cache entry to be updated”
Sender MAC is “the link-layer address to which this cache entry should be updated”. In a reply, Target MAC is set to that address too. In a request, Target MAC isn’t used
It “MUST be transmitted as a local broadcast packet on the local link”
It works because of RFC 826’s rule that a receiver MUST update an entry it already has from any ARP packet, request or reply, even a reply to no request of its own
The IP needn’t be the sender’s own. When a mobile node leaves its home network, its home agent sends gratuitous ARPs on the node’s behalf, with the node’s home IP and the home agent’s own MAC (lines 4158-4167 and 4245-4252). So “a host announcing its own address” is the usual case, not the definition
Broadcasts aren’t reliable, so it SHOULD be retransmitted a small number of times