GRE (Generic Routing Encapsulation) Tunneling is used when IP (internet protocol) packets need to be sent from one network to another, without any parsing or encryption.
IPSEC (Internet Protocol Security) is the primary protocol used on the Internet. In general, it is used to encapsulate packets, but it secures the encapsulated payload using encryption. IPSEC ESP (Encapsulating Security Payload) is used when IP packets need to be exchanged between 2 systems and need to be protected from a man in the middle attack. IPSEC uses cryptographic algorithms to scramble the IP packet. This will allow the sender and receiver to be aware of any modification or malicious actions potentially taken on the packet.
GRE tunnels should be used when privacy is not required, but there is a need for simple and fast packet transportation. IPSEC ESP should be used when IP tunneling and data privacy are required.