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 Cowboys (8-6) moved into a three-way tie for the NFC East lead with the New York Giants and Washington Redskins. The Cowboys have won three straight and five of six.
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.
But Sean Lissemore and Anthony Spencer sacked Roethlisberger on consecutive plays to give the Cowboys the ball back.
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.
But Brown fumbled when Victor Butler reached out and knocked the ball loose at the end of a 22-yard return. DeMarco Murray then went in on a 3-yard run.
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.
Isaac Redman went 22 yards on the first play after the punt, and Roethlisberger completed passes of 20 yards to Mike Wallace and 21 to Jerricho Cotchery before the scoring toss to Brown.
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.
Online: http://pro32.ap.org/poll and http://twitter.com/APNFL
Pittsburgh 0 10 7 7 0 24
Dallas 3 7 7 7 3 27
Dal • FG Bailey 50, 8:36.
Dal • Witten 17 pass from Romo (Bailey kick), 11:02.
Pit • FG Suisham 32, 6:03.
Pit • Miller 30 pass from Roethlisberger (Suisham kick), :34.
Dal • Bryant 24 pass from Romo (Bailey kick), 6:03.
Pit • Dwyer 1 run (Suisham kick), 4:16.
Pit • A.Brown 7 pass from Roethlisberger (Suisham kick), 12:37.
Dal • Murray 3 run (Bailey kick), 6:55.
Dal • FG Bailey 21, 13:36.
Attendance • 95,595.
First downs 20 23
Total Net Yards 388 415
Rushes-yards 17-69 21-87
Passing 319 328
Punt Returns 3-51 2-38
Kickoff Returns 2-49 1-25
Interceptions Ret. 0-0 1-36
Comp-Att-Int 24-40-1 30-42-0
Sacked-Yards Lost 4-20 1-13
Punts 6-43.0 6-48.0
Fumbles-Lost 2-1 1-1
Penalties-yards 0-0 8-61
Time of Possession 27:00 34:24
Rushing • Pittsburgh, Redman 3-30, Dwyer 9-22, Rainey 3-15, Roethlisberger 2-2. Dallas, Murray 14-81, F.Jones 3-10, Romo 4-(minus 4).
Passing • Pittsburgh, Roethlisberger 24-40-1-339. Dallas, Romo 30-42-0-341.
Receiving • Pittsburgh, A.Brown 8-76, Miller 7-92, Wallace 4-95, W.Johnson 2-34, Cotchery 2-28, Redman 1-14. Dallas, Austin 7-79, Witten 5-43, Bryant 4-59, Harris 4-46, Murray 4-31, Hanna 2-45, Beasley 2-14, Vickers 1-15, Ogletree 1-9.
Missed Field Goals • None.