Dali's elephants on stilts recur throughout his work. He was inspired by Gian Lorenzo Bernini's sculpture of an elephant carrying an obelisk on it's back. Here's a photo of the sculpture:
The Surrealists were heavily influenced by the work of Sigmund Freud. Dali adopted the image of the elephant with the obelisk because of it's correlation to the phallus. There might also be a reference to the male domination over the female, something Freud was adamant about, in Dali's adaptation of the elephant on stilts.
Polish artist Malgorzata Jasinska was inspired by Dali's elephants to create this piece:
You can learn more about elephant art here.