The Cowboys won on a Bailey field goal on the final play for the second straight week since practice squad linebacker Jerry Brown was killed in a one-car accident that led to manslaughter charges against teammate Josh Brent for allegedly driving drunk.
The winning kick came after Tony Romo, who broke the 25,000 yards passing milestone earlier in the game, took a knee to put Bailey in better position.
Bailey beat Cincinnati 20-19 last week with a 40-yarder as time expired, just a day after the accident that killed Brown.
The Steelers (7-7) lost for the fourth time in five games and trail AFC North rival Cincinnati by a game for the second wild card spot. They host the Bengals next week.
The score was tied at 24 in the final two minutes of regulation, Pittsburgh quickly moved to its 46 after a completion by Roethlisberger and a roughing-the-passer penalty against DeMarcus Ware.
Dallas, playing with Brown's No. 53 jersey draped on their bench and his number on a helmet decal, couldn't do anything in the final minute.
The drive stalled at the Steelers' 43, and Bailey lined up for a 61-yard field goal attempt with 32 seconds left. But the Cowboys called timeout and punted instead. Roethlisberger took a knee, sending the game to overtime.
Roethlisberger was sacked four times and finished 24 of 40 for 339 yards with two touchdowns and an interception.
Earlier in the fourth quarter, Pittsburgh was driving for a go-ahead score when Ware and Spencer sacked Roethlisberger at the Dallas 40, forcing a punt with 3 minutes left. The Cowboys opted to punt at the two-minute warning after a third-down pass to Dwayne Harris was less than a yard short of the first down.
Roethlisberger put the Steelers ahead 24-17 with a 7-yard scoring pass to Antonio Brown, and Brown was about to put Pittsburgh in control with a long punt return.
Tied at 17, the Cowboys were facing third-and-1 from midfield when Romo was stuffed for a 5-yard loss by James Harrison on a bootleg.
The teams traded quick touchdowns in the third quarter after going to halftime tied at 10.
Dez Bryant extended his touchdown streak to six games while playing with a broken left index finger. Roethlisberger answered that 24-yard score with a 60-yard pass to Wallace to the Dallas 2. Jonathan Dwyer scored from a 1 after a penalty.
Romo was 7 of 7 on the drive to Bryant's touchdown and overcame a 13-yard sack by Lawrence Timmons. The throw to Bryant put Romo over 25,000 yards passing for his career. Romo finished 30 of 42 for 341 yards and two scores.
The first Dallas touchdown was the first scoring connection from Romo to Jason Witten this season.
After two long completions to backup tight end John Hanna, Romo found Witten along the seam and hit him in stride at the goal line on a 17-yard score for a 10-0 Dallas lead in the second quarter. Witten's only other TD came from Kyle Orton at the end of a blowout loss to Chicago.
Roethlisberger pulled the Steelers even at 10. He stepped away from pressure and used a couple of pump fakes to keep pass rushers away before finding Heath Miller wide open along the sideline on a 30-yard score.
After stopping to make the catch, Miller ran in untouched to chants of ''Heath'' from the black-and-gold clad fans.
Miller finished with eight catches for 76 yards, and Miles Austin led Dallas with seven catches for 79 yards.