It doesn't have a literal meaning, and it's not a traditional saying. It's more of a contemporary idiom that uses the image of kissing a donkey to convey the idea of a humiliating defeat or a ridiculous situation.
Think of it like saying, "He got kicked in the teeth," or "That was a major flop."
The phrase likely gained traction in the internet era due to its humor and its ability to express disappointment in a light-hearted manner.