This is one of a few things that was explained in detail in the book, but in the movie they made very effective use of not fully explaining them. Main reason they're effective is because they end up being really scary that way. (Personally I think the movie is brilliant and prefer it over the book.)
In the book, the woman's name is Mrs. Massey. She came to the Overlook Hotel for an affair with a much younger man; every night, she would get very drunk at the bar, and the two would go back to the room. After several days, the young man took off. The following evening, Mrs. Massey got into the bathtub in her room and killed herself by taking thirty sleeping pills washed down with liquor. After her body was discovered, Mr. Massey covered up the incident by bribing the coroner to change the cause of death from suicide by overdose to heart attack. And after that, anyone with the shining ability was able to see Mrs. Massey in the bathtub of the room.
In the movie, this entire subplot is take out, yet the old woman in the bathtub is present, albeit with little or no explanation for who she is or why she is there. The most obvious explanation in the context of the film is that room 237 is merely a haunted room where an old lady died and, when Danny entered the room, the old lady tried to strangle him. However, when Jack goes into the room, instead of seeing an old lady, he sees a beautiful young woman in the tub who turned into the old lady after they kiss. This discrepancy (between Danny's experience and Jack's experience) is sometimes interpreted as Jack's complete embracing of the "evil" in the hotel, choosing it over his family. Once he has embraced the evil, it shows its true form, as it no longer needs to seduce him (it no longer needs to appear attractive to him).
Another theory is that the woman is Grady's wife, whom he murdered along with his two daughters. Prior to Jack's entry to room 237, the only ghosts seen up to that point are the Grady daughters.