The phrase 'dog guards the gates of hell' is a metaphorical expression that refers to a concept in Greek mythology where a three-headed dog named Cerberus guards the entrance to the underworld.