This lovely short story takes place in the apartment of the two main characters, Della and Jim. Their apartment is small, with only two windows and the looking glass (mirror) mentioned. The narrator actually states, "Furnished rooms at a cost of $8 a week. There is little more to say about it." Other than that, the only other detail we get about the apartment is that even their mailbox is very small.
Really, the physical setting is not that important. What's more important about the setting is the time, which is Christmas Eve. This is necessary because it shows us the desperation that these two have when it comes to buying a gift for one another - they've saved until, literally, the last minute. Now's the time to buy the gift, and they're each still short. This is why Della sells her beautiful hair and Jim sells his precious watch.
The story takes place in New York. O'Henry describes the apartment where Jim and Delia live in great detail in order for the reader to understand the great sacrifices Delia and Jim are making when they sell their most prized possessions. The details of their apartment also give the setting a more realistic feeling, so that we can identify with the characters.
The story primarily takes place in the couple's apartment. It is described as being a meager place that they live, but clean and well-kept. Della works hard to make sure that what they do have is nice. There is a small mirror between two window in which Della can look to make sure she looks nice for Jim. It is upstairs and their mailbox, which is small for even the smallest amount of mail is downstairs.