As far as I understand this means some kind of trick that helps you to memorise something without deep understanding. Is it so? Is there a story behind this word?
Yes, you're right about its meaning. An Eselsbrücke is, for instance, a word or phrase that helps you to remember something. A good English translation is mnemonic.
Alle Priester Saufen Tequila Nach Der Predigt.Application / Presentation / Session / Transport / Network / Data Link / Phyiscal
About its origin, there's a quite possible version given at redensarten.net.
The thing is that a horse (similar to a donkey in many respects) would simply jump over a ditch, a brook or whatever. The donkey, however, won't even go through the ditch.
But if you build a bridge (or take an existing one), the donkey walks over that one without hesitation. 1
The 'donkey bridge' helps to get to the other side.
In a television show of ZDF, they second this story.
1 They mention (and the link in Matthias' comment seconds this) that the original meaning was quite a bit different and that it changed.
However, I am not sure if there's an error in that article or if it's just a little too late for me right now, but I don't quite get it.