Bailey was selected by the Oakland Athletics in the sixth round of the 2006 Major League Baseball draft. He made the Athletics Opening Day25-man roster for the season as a long shot, and made his major league debut on April 6, 2009, tossing a scoreless inning against the Los Angeles Angels of Anaheim. Bailey was selected to represent the Athletics in the 2009 MLB All-Star Game in St. Louis. He was the 2009 August AL Rookie of the Month. He broke the Athletics rookie save record on September 12 against the Minnesota Twins with his 24th save of the season. After a final line of 26 saves and a 1.84 ERA and a 0.876 WHIP, Bailey was named 2009 American League Rookie of the Year on November 16, 2009. He was selected again to the All-Star team in 2010, which he finished with 25 saves, a 1.47 ERA and a 0.959 WHIP. On September 12, 2011, Bailey was hit right above the temple by a line drive in batting practice. He felt fine, passed concussion tests, and sat out the next few days. He returned to action to face the Tigers a few games later. His ERA ballooned to 3.24, though he did finish with 24 saves.
Boston Red Sox
On December 28, 2011, Bailey and Ryan Sweeney were traded from Oakland to the Boston Red Sox for Josh Reddick and two minor leaguers. On April 4, 2012, it was announced that Bailey would require reconstructive surgery on his right thumb and that he would begin the 2012 season on the disabled list. Bailey made his 2012 debut with the Red Sox on August 14, pitching a third of an inning in a loss to Baltimore. He finished the 2012 season with 15 innings pitched, a 7.04 ERA, and a 1.89 WHIP. Bailey began the season as a middle reliever with the Red Sox, but when closer Joel Hanrahan was injured in mid-April, Bailey took over the closer job. He was the 2013 Apr 21st AL Player of the Week. Bailey compiled 8 saves, a 3-1 record and a 3.77 ERA in 30 appearances until he suffered a shoulder injury that kept him from playing for the rest of the season. After the All-Star Break, MRIs confirmed there was a torn capsule and damaged labrum in his throwing shoulder. He underwent shoulder surgery on July 24, ending his 2013 season. After the 2013 season, Bailey was non-tendered by the Red Sox, making him a free agent.
On February 22, 2014, Bailey signed a minor league deal with the New York Yankees with a $2.5 million salary if he made the major league roster, and a club option for the 2015 season. After numerous setbacks in his recovery from his shoulder injury, Bailey was ruled out for the 2014 season on August 17. The Yankees signed him to a new minor league contract on November 7, 2014, after declining his 2015 option a few days earlier. The Yankees promoted Bailey to the major leagues on September 1, 2015. On September 2, he entered in the seventh inning at Boston, his first appearance in a game in two years. In 10 appearances, he posted a 5.19 ERA. On November 3, the Yankees declined Bailey's option for the 2016 season, making him a free agent.
Philadelphia Phillies
Bailey signed a minor league contract with the Philadelphia Phillies in December 2015, receiving an invitation to spring training. He was called up to the Phillies on April 20, 2016. He was designated for assignment on August 2, and released on August 6.
Los Angeles Angels
On August 13, 2016, Bailey signed a minor league deal with the Los Angeles Angels. Bailey was called up in late August and collected six saves for the Angels in 12 games, with a 2.38 ERA and a 0.971 WHIP. On November 9, Bailey signed a one-year, $1 million contract to remain with the Angels. His 2017 season was cut short due to a shoulder injury, limiting him to four games.
Post-playing career
Bailey announced his retirement on February 26, 2018, to take up the job of instant replay coordinator and coaching assistant for the Los Angeles Angels. Bailey spent the 2018 season as the Angels bullpen coach. Prior to the 2020 season, Bailey was hired by the San Francisco Giants as their pitching coach.