Bailey's decisive boots each came within the final 3 1/2 minutes of regulation, helping the Cowboys (3-3) snap a two-game losing streak.
Jason Witten chipped in with six grabs for 44 yards in the win.
The Panthers (1-5), meanwhile, dropped their fourth straight despite 222 yards and score as well as 64 rushing yards on six tries from Cam Newton.
Steve Smith led Carolina's receivers with 83 yards on seven catches.
2014 amfAR Inspiration Gala [PHOTOS]
Julius Randle breaks leg during NBA debut