Not in my chocolate cake! Espresso - yes, garlic - no. Although if someone offered me a piece of chocolate cake with garlic in it, I would try it. And maybe it would be fine. Especially if the chocolate ganache was slathered thick enough!
I've seen garlic used in desserts, mostly on shows like Chopped. Black garlic might work, I suppose, it has a strange sweetness to it, not that I'd dare try it at home.
Garlic is used way too much, many restaurants use it as their dominant flavoring.
Interestingly enough, when we were in Northern Italy in 2006 (Turin), we found very few restaurants used garlic in their cooking, even the pizza was garlic-free. Southern Italian cooking is more prone to use garlic, but even there I'm told it isn't as omnipresent as it is in 'Americanized Italian' cooking.