Scolari had cancer and had been ill for two years, according to his manager, Ellen Lubin Sanitsky.
He first gained attention as the then-unknown Hanks' co-star in the 1980-82 sitcom "Bosom Buddies," in which their characters disguised themselves as women to live in affordable, females-only housing.
The two actors went on to work together in projects including Hanks' 1996 movie directorial debut "That Thing You Do!" and in 2013's "Lucky Guy," Nora Ephron's play about newspaper columnist Mike McAlary.
Scolari also played on Broadway in "Wicked." "Hairspray" and 2014's "Bronx Bombers," in which he played baseball's Yogi Berra.
His recent roles included Bishop Thomas Marx on the supernatural series "Evil." Series co-creator Robert King remembered him Tuesday as "just wonderful."
Scolari was "one of the funniest - sneakily funny - actors we've worked with. He always took a nothing scene and found different ways to twist it, and throw in odd pauses that made it jump," King said on Twitter.
He received three Emmy nominations playing husband Michael to Julia Duffy's character Stephanie and boss to Bob Newhart's inn owner and local TV host in the 1980s sitcom "Newhart."
In 2016, he won an Emmy Award for the role of Ted Horvath, father to Lena Dunham's Hannah, in "Girls." In the course of the dramedy created by Dunham, Ted comes out as gay and leaves his wife to find fulfillment.
Scolari's more than four-decade career included guest roles on "ER," "White Collar" and "Blue Bloods."
Scolari whose previous marriages ended in divorce, is survived by his wife, actor Tracy Shayne, who played opposite him as Berra's wife in "Bronx Bombers." Scolari's survivors also include his children Nicholas, Joseph, Keaton, and Cali.
The Associated Press contributed to this report.