Bailey’s 11th goal with 18 seconds remaining in extra time came when he was set up alone at the side of the net on a perfect feed from John Tavares.
Until that point, the best chance of overtime was when Calgary’s Mark Giordano rang a shot off the goal post with a minute remaining.
Thomas Hickey also scored for New York (33-19-7). Third in the Metropolitan Division, the Islanders remain three points back of the New York Rangers, who were also victorious Thursday.
The Islanders have won the first three games of a franchise-record seven-game road trip that will continue in Edmonton on Sunday.
Jiri Hudler scored for Calgary (26-30-4). The slumping Flames are 1-5-1 in their last seven.
The Islanders tied it 1-1 at 9:49 of the third period.
Matt Martin charged his way down the sideboards, evading checks from Giordano and Sean Monahan, then sent a pass to Hickey in the slot, whose backhand handcuffed Joni Ortio, bouncing off him and in.
For Hickey, a Calgary native, it was his first goal in 37 games.
Halak kept the Islanders within a goal by thwarting Hudler from the top of the crease one minute into the third period.
The 30-year-old, who improves to 16-12-4, has started all three games on the road trip and stopped 88 of 90 shots.
Ortio made his second start in a row and again looked very good in net for the Flames, stopping 32 shots in falling to 0-5-1.
That comes after 35 saves in a 2-1 loss to Los Angeles on Tuesday.
Calgary scored the lone goal of the first period on a three-way passing play. Johnny Gaudreau sent a pass in front to Monahan, who slid it across to Hudler, who fired a high shot over Halak as the Islanders goalie scrambled across.
After a disappointing first half to the season, Hudler — a pending unrestricted free agency — has picked it up lately with 13 points (five goals, eight assists) in his last 15 games. Key in the line’s success has been Gaudreau, who has eight points (one goal, seven assists) during a six-game point streak.
Notes: Flames D Kris Russell (lower body) missed his sixth consecutive game. RW Josh Jooris was a healthy scratch… Sidelined for a second straight game for New York was Mikhail Grabovski (upper body)… It was the Calgary’s first overtime game at home since Dec. 12. Their record at the Saddledome falls to 6-1.