From Tolkien Gateway

Poor Galathea was Farmer Giles' favorite cow who was squashed flat when the giant stepped on her as he came blundering across the farmer's lands one fine summer's night. Her demise prompted Garm the dog to awaken Giles to tell him of the giant's arrival, claiming that Galathea was as flat as a doormat.[1]

The mythological name Galathea "milk-white" (fem.)[2] is probably chosen because milk refers to cows in general – or it refers to the actual colour of the cow (which is not mentioned in the story).