The Doctor Who actress will appear alongside Sue Johnston, Alun Armstrong and Frances Barber in the Kay Mellor-penned romance.
Piper will play Betty, a young wife who falls in love with Polish neighbour Alex Crazenovski (Theo James) in the 1950s. Two decades later her affair will be exposed on her son Mark's (Andrew Lee Potts) wedding day.
Johnston is cast as Betty in the 1980s, while Armstrong will portray her devoted but dull husband Donald. The younger version of Donald will be played by Armstrong's real-life son Joe.
Rachel Leskovac and Barber will feature as the younger and senior versions of Betty's sister Margaret.
"I am thrilled that we are bringing this beautiful drama by Kay Mellor to BBC One," said BBC commissioning editor Polly Hill. "It has its roots in something very personal for Kay, but it's also an epic love story that is played across four decades.
"We are delighted that the script has attracted such a wonderful cast led by Billie Piper and Sue Johnston and we are sure it will prove a real treat for the audience."
Mellor will co-direct the project with Antonia Bird (Cracker, Rehab).