The Empress of Mars
by Kage Baker
This is a weird one. The general format is chapter-long episodes of "be careful what you wish for... you'll get it," but instead of gradually going to hell, things actually get better as plot bumps along. Increasingly complicated, but better.
Easily the best part of this book is the setting. The entertainingly and lovingly dysfunctional Martian colony manages to toe a narrow line between the hackneyed utopian-or-dystopian space colonies of other sci-fi.
The elements of magical realism kicking in at the end didn't come out of nowhere, but they were unexpected and didn't do it for me. I think I'd have to go back and reread the whole book through that filter for it to work.