Clearly both of these stories are ironic, at least in the sense of things not turning out the way you would expect them to. So in that sense, they're similiar -- they both have surprise endings.
What's different about the two is the nature of the irony. In "The Gift of the Magi," the irony is bittersweet. It makes us feel sorry for the main characters. In the other story, the irony is much more amusing. I suppose you could feel sorry for the kidnappers, but really, they were criminals and got what they deserved. It's more natural to laugh at them for getting into that predicament.
So the two stories are very different since the ironic endings provoke very different responses in the reader.