The story of "The Gift of the Magi" is one of unrelenting love and sacrifice. Delia and Jim are dealing with hard times, and neither has any money to celebrate their love for each other at Christmas. The two items they have of which they are most proud are Jim's heirloom watch, and Delia's long, lustrous, beautiful hair. They ultimate sacrifice they take is to sell the items most dear to them in order to buy the gifts each thinks the other deserves. Delia sells her hair to buy Jim a watch chain for his watch. Jim sells his watch to buy her a lovely comb for her hair. Ironically, the gifts are useless to each other now, but they are a symbol of how much they love one another and to what lengths each would go to make the other happy.
Your question is how can this story be related to other stories? Well, for one, any story of great love and sacrifice is easily related to this one. Romeo and Juliet also went to great lengths to be together and show each other love. Elie Weisel's father gave his son his rations for a long time to keep the boy from being hungry in NIGHT. The story of the people who crucified Jesus Christ is easily relatable since he gave his life for the love of all the people (even those who insisted on his death) on earth.
The title of this story also gives you hints. "The Gift of the Magi" reminds us of the Christmas story (also a connection since O. Henry's story is set at Christmas) when the three wisemen (also called Magi) traveled great distances just to see the Christ child and to give him gifts of gold, frankincense and myrrh.
Now, think of other stories, TV shows, movies, or songs you have seen, heard, or read which might relate in some way to this one. What great sacrifices for love, gifts for love, characters, setting, intentions remind you of "The Gift of the Magi"? Good Luck!