Hansen was born on December 5, 1921 in Oakland, California. His family moved to Detroit, Michigan. Hansen served in World War II in the United States Marine Corps and flew combat in the South Pacific. He flew F4U Corsairs and participated in the invasion of Peleliu in September 1944. In 1950, after he left the Marines, Hansen signed a contract with Paramount Pictures and became an actor.
Hansen has appeared in more than 100 films, television series and made-for-television movies. His early acting roles was at the famed Pasadena Playhouse. Hansen was a guest star on Reed Hadley's CBS crime drama, The Public Defender, and the television adaptation of Gertrude Berg's comedy The Goldbergs. In addition to his work on General Hospital, he notably co-starred in 1963 on the NBC soap opera Ben Jerrod. He also appeared on The Golden Girls in 1985 (Season 1, Episode 5) as Dr. Elliott Clayton, a casanova who makes a pass at Blanche while dating Dorothy. In 1988, he starred in an episode of Cheers ("And God Created Woodman"; Season 6, Episode 14), as Daniel T. Collier, the CEO and Chairman of the Board of Lillian, the company which owns Cheers. Other notable appearances include work on Broken Arrow, Richard Diamond, Private Detective, Maverick, Sea Hunt, Petticoat Junction, Gomer Pyle, U.S.M.C., How The West Was Won, The Adventures of Jim Bowie, Magnum, P.I., L.A. Law, Night Court, and Growing Pains.
Hansen had a major role in the 1950 Western film Branded with Alan Ladd, the 1951 science fiction film When Worlds Collide, and the 1952 Western film The Savage with Charlton Heston. In the 1960s, He made commercials for Chrysler products, mostly Plymouths, on shows hosted by Lawrence Welk, Steve Allen, and Garry Moore. In 1961, Hansen was a news anchor at the Los Angeles based TV station KCOP-TV.
In 1997, Hansen began playing the character on the sister show Port Charles. The early years of Port Charles saw the Baldwins as the core family, focusing on Lee's son, Scotty, and granddaughter, Karen. After their storyline took them back to "GH", Peter made occasional appearances on both shows, last appearing in 2004. Although he retired from acting afterwards, he did appear at the off-screen 50th Anniversary party in 2013 along with former on-screen wife Susan Brown.
Hansen met his future wife, Florence Elizabeth (née Moe), while in high school and married her in 1943. Together, they had two children, Peter and Gretchen, had three grandchildren: Allison, Erik and Jamal. Betty died in 1993. He then shared 24 years as companion to Barbara Wenzel.