Eleanor Parker as the baroness with Christopher Plummer as Captain Von Trapp in The Sound of Music, 1965. Photograph: Allstar/20th Century Fox/Sportsphoto
In the Hollywood of the 1940s and 50s, when typecasting was an essential constituent of stardom, Eleanor Parker, who has died aged 91, never gained the recognition she deserved, because she refused to be pigeonholed. "It means I've been successful in creating the characters that I've portrayed – that I'm not just a personality who is seen in a variety of roles." Dana Andrews, her co-star in Madison Avenue (1962), called her "the least heralded great actress".
The 1957 film Lizzie is almost a reflection of her career. Parker plays three separate and distinct characters harboured inside one woman – the shy, self-effacing Elizabeth; the wanton, raunchy Lizzie; and the "normal" Beth – and switches brilliantly from one to the other. Parker was always able to be convincing in these three sorts of characters. She was naive as the girl in love with Ronald Reagan in The Voice of the Turtle (1947). In it, Reagan whispers to her: "You're very sweet. I don't know what goes on in that funny little head of yours, but you're very sweet."
In contrast, she was the cockney waitress Mildred Rogers in Of Human Bondage (1946), who obsesses Paul Henreid as the tormented medical student in the first remake of the Somerset Maugham story. "I can't help it," he cries. "Even though I've despised her, I yearned for her madly. How can there be a greater torture in this world to love and at the time condemn? She's in my blood."
In her third persona, Parker was the sophisticate, as in the role for which she is best known by a later generation, the wealthy and glamorous baroness, love rival of Maria (Julie Andrews), in The Sound of Music (1965). "I'm sure you'll make a very fine nun," she tells Andrews, tartly. Almost two decades before, Errol Flynn said to her in Escape Me Never (1947): "I hate to repeat the obvious, but you are beautiful. There's something so cool and lovely about you; you're like edelweiss."
Parker was born in Cedarville, Ohio, the youngest of three children. Her father was a teacher of mathematics, and her family had no theatrical background. Yet, at a young age, she started performing in plays at school. Already a beauty in her teens, she studied at the Rice Summer theatre in Martha's Vineyard in Massachusetts. While she was there, an agent from 20th Century-Fox offered her a screen test, which she declined in favour of continuing her education. After she graduated from high school, she studied at the Pasadena Playhouse, where a Warner Bros scout spotted her, and she was again asked to do a screen test. She refused. Finally, in 1941, aged 19, she was ready, and called Warners, who signed her to a contract.
Her film debut was in a small part in the Flynn epic They Died With Their Boots On (1941), but she was cut from the final release print. However, she soon had a few ingenue roles. On the set of Mission to Moscow (1943), she met Lieutenant Fred Losse, a navy dentist, and they were married soon afterwards. The marriage lasted for two years.
Parker was kept busy at Warners throughout the 1940s, her first major starring part being in Between Two Worlds (1944), based on the 1924 play Outward Bound. It involves a group of passengers on a mysterious boat who find they are dead and must now face the after-life. Parker gave a sensitive portrayal of a woman who, refusing to be separated from the man she loves (Henreid), has joined him in suicide.
Parker gave another touching performance in Pride of the Marines (1945) as the girlfriend of a war hero (John Garfield) who is blinded fighting on Guadalcanal. But her greatest challenge to date was as the ruthless Mildred in Of Human Bondage (1946), not only because Bette Davis in the same role 12 years previously was still in some people's minds but because Parker had to reveal a nasty side, which she did with relish, especially in the scene where she smashes up a room with a poker. She tried to perfect her cockney accent for the role. "I got a book dealing with the dialect … and I pretty well wore it out."
Parker made another reasonably successful attempt at an English accent (this time a posh one) in The Woman in White (1948), a respectable Hollywood adaptation from the Wilkie Collins mystery.
Her stardom assured, Parker married Bert Friedlob, a would-be film producer, in 1946. Although she took some time off to have two daughters and a son, she was still fairly active on screen. She received the first of her three Oscar nominations for the wrongly convicted prisoner in Caged (1950), in which she clearly defines the gradual changes in the pregnant prisoner's character, from innocence to corruption. By the time she leaves prison, we see by her walk, her attitude, and even her voice, how life inside has affected her.
In 1950, Parker decided not to renew her contract with Warners and went freelance. Among her best roles in the 1950s was as loving wife to detective James McLeod (Kirk Douglas) in Detective Story (1951), revealing to him that she had an abortion when she was young, before they met. Variety commented that she "plays the wife with a dignity and emotional depth". For this comparatively short part, Parker was again nominated for an Oscar.
At MGM, she came into her own in a number of their finest productions. In Scaramouche (1952), she is Lenore, the fiery travelling performer of whom Stewart Granger's character says: "When you are placid, you are beautiful. When you're angry, you are superb!" Parker was then paired with Robert Taylor in three movies, one of which was a comedy western, Many Rivers to Cross (1955). She co-starred with William Holden in John Sturges's superior western Escape From Fort Bravo (1953). Holden introduced her to her third husband, Paul Clemens, an artist, with whom she would have a son.
One of Parker's greatest roles was as the polio-afflicted Australian dramatic soprano Marjorie Lawrence in Interrupted Melody (1955). With her voice dubbed by Eileen Farrell in the opera sequences, Parker brought superb emotional power to the part. Again, she was nominated for an Oscar. There followed another string of challenging and contrasting roles: Frank Sinatra's possessive wife in The Man With the Golden Arm (1955); the unhappy wife in The Seventh Sin (1957), based on Maugham's The Painted Veil; the handsome widow angling for Sinatra in Frank Capra's A Hole in the Head (1959) and the long- suffering wife of a wealthy Texas land baron (Robert Mitchum) in Vincente Minnelli's Home from the Hill (1960).
Apart from The Sound of Music, many of Parker's films in the 1960s were inconsequential. She kept being referred to as an "old lady" as the agent of an over-ambitious actor (Stephen Boyd) in The Oscar (1966), which gives some indication of how Hollywood treated stars moving into middle age.
As films dried up, Parker turned to television. She appeared in a wide variety of shows, including the series Bracken's World (1969-70). One of her last appearances was in a TV movie called Dead on the Money (1991), a performance of which the New York Post wrote: "Parker as a matriarch flashes so much style with just a cold calculating smile that it's a shame the veteran actress hasn't found more regular work."
Her marriage to Clemens ended in divorce in 1965; and her fourth husband, Raymond Hirsch, whom she married the following year, died in 2001. She is survived by her four children, Susan, Sharon, Richard and Paul.
• Eleanor Jean Parker, actor, born 26 June 1922; died 9 December 2013