In addition to the similar use of irony and point of view as mentioned above, there is in both Saki's "Dusk" and O. Henry's "Gift of the Magi" the surprise ending which results from the characters' misperceptions and assumptions about others.
In "Dusk," for instance, Norman Grotsky, who sits on the bench at the park on Hyde Park Corner, assumes that all who come there seek anonymity as they have somehow been defeated in life. But, of course, he has misjudged the old man at the end of the bench who bought the cake of soap. Similarly, Della and Jim have assumed a pre-existing condition with each other which allows them to make the decision to buy the gifts that they have. They, too, underestimate others; they underestimated the love that their spouse had for them.
Both authors rely heavily on irony. In Munro's "Dusk," the old man who thinks of himself as so clever and observant is duped. In "The Gift of the Magi," Jim and Della sacrifice what they cherish in order to buy gifts for each other, only to find out that their gifts are associated with what they had sacrificed. This type of situational irony is common of Munro's and O. Henry's writing.
Stylistically, both authors use a third person narrator who allows the reader into the characters' heads. We know what each character is thinking, and this helps establish a different type of irony (dramatic irony).
if we talk about the story ot the gift of magi and dusk we oberve that both of the stories have been very well written with perfect touch.we also observe that both the story start with a pessimistic note-
dusk-norman sits and describes dusk as the hour of the defeated in life,the hour of those who wanna to hide their faces from the people outside in the world.
the...magi-we observe that the Della is visualizing the surrounding in the same way,her current situation is.Recall the usage of word GRAY which tells the scenario inside the mind of Della.It was full of worries,negativism,etc