One definition for "complication" as a literary term is that it is a series of problems or difficulties that make up the main action of a piece of literature.
In this story, I think that the complication goes from the seventh paragraph down to the part near to the end where Jim gives Della her present.
In that time, we see the main issues in the story -- what will they be able to get each other? How will they pay for those things? Now we know what they have each gotten and how. All that is left is to see how they will each react to what they have done.
Initial plot problem is thoroughly spelled out by the narrator. Della wants to buy her husband a special Christmas present but she has only managed to save $1.87.
One dollar and eighty-seven cents. And the next day would be Christmas.
This is not a complication but the initial problem. The complication arises when she decides to sell her hair. This makes the whole situation more complicated. She has made a radical decision, and there is no way for her to undo it even though she has serious misgivings. She thought she looked awful without her gorgeous long hair.
When Della reached home her intoxication gave way a little to prudence and reason. She got out her curling irons and lighted the gas and went to work repairing the ravages made by generosity added to love.
She does not care so much about herself, but she is deeply concerned about how her husband Jim will react when he comes home and sees her.
She had a habit for saying little silent prayers about the simplest everyday things, and now she whispered: “Please God, make him think I am still pretty.”
She is not only afraid that she might lose Jim's affection but that she might even lose her husband. O. Henry hints that she might be pregnant, in which case the loss of her husband would be a total disaster resulting from the simple desire to buy a nice Christmas present for the man she loves. The hint that she might be pregnant and has not yet told Jim the news is contained in the following line.
Poor fellow, he was only twenty-two—and to be burdened with a family!
The word family suggests that Jim will not only have a wife to support but a baby. Assuming this is the case, it makes Della's problem all the more complicated. Jim's affection means everything to her. She is not only emotionally dependent on him but financially dependent as well. Love itself can bring a lot of complications into people's lives.
The fact that Jim has sold the watch for which Della bought an expensive fob by selling her hair to raise the necessary money may or may not be considered another plot complication. Jim's sacrificing his love to buy his wife a set of combs for her hair resolves the whole complicated problem because it proves conclusively how much he loves her. And he tells her so in words:
“Don't make any mistake, Dell,” he said, “about me. I don't think there's anything in the way of a haircut or a shave or a shampoo that could make me like my girl any less."
The sacrifices Della and Jim have made for each other brings them even closer together.
I think the complication is when they sacrificed their own possesion, Jim's gold watch and Della's beautiful hair. Coz it's where the problem starts.
The complication in "The Gift of the Magi" is the part of the story that makes the resolution almost not happen. I think that the resolution of the story is when Jim's pay is reduced.