The club captain headed home a corner from Florent Malouda in the 83rd minute but his celebration was muted.
It was a cruel blow for Burnley, who had drawn level through Steven Fletcher after Nicolas Anelka had opened the scoring.
Chelsea were looking to kick on after the victory over Birmingham and coach Carlo Ancelotti made two changes.
Alex and Yury Zhirkov were back in the side with Deco and Ricardo Carvalho stepping down.
Burnley manager Brian Laws gave a debut to Leon Cort after his 1.5million pound arrival from Stoke in midweek.
It was Laws' first home game in charge and a daunting one at that, especially after three straight defeats under his stewardship.
Terry was under the spotlight and his first touch saw him head the ball out of play.
Cort had to be on his toes in the seventh minute following a swift counter-attack by Chelsea. Joe Cole picked out Nicolas Anelka and his cross was turned away by the new signing from Stoke.
Chelsea maintained the momentum and Anelka played the ball back to Frank Lampard a minute later but he skied his shot over the crossbar.
Then Anelka fluffed his effort inside the area to the amusement of the Burnley fans, after good work by Joe Cole.
The home team responded and Robbie Blake thumped a free-kick into the wall in the 17th minute after Michael Ballack had been penalised for a challenge on Chris Eagles.
Back came Chelsea and Florent Malouda delivered the ball into the area only for goalkeeper Brian Jensen to make a comfortable save.
While the visitors were knocking the ball about well, Burnley were holding their own at this stage of the game.
Chelsea made the breakthrough in the 27th minute through Anelka's 12th goal of the season.
It was a sweeping move that caught Burnley flat-footed. Joe Cole delivered a cross to the back post and Malouda chased what looked like a lost cause.
He managed to steer the ball back into the area from the left, and Anelka lost two defenders to coolly finish things off.
It was just the boost Ancelotti was looking for on a ground where Manchester United lost earlier in the season.
It was proving a difficult spell for Burnley but Andre Bikey then rattled a shot over the bar as Terry tried to close him down.
Terry was then booked in the 35th minute for barging over Blake as he tried to burst forward.
The crowd was incensed with the Chelsea defender's challenge and let him know.
Chelsea, though, were playing with confidence and Jensen did well to head clear as Anelka tried to get on the end of a good ball from Branislav Ivanovic.
Blake then sent a free-kick into the Chelsea area after 43 minutes but Anelka showed his defensive qualities by heading clear.
Chelsea started the second half brightly with Malouda advancing and smacking a shot wide of the post in the 47th minute.
However they were stunned three minutes later when Burnley equalised after clever work by Blake.
He put Alex under pressure with a ball into the area and Fletcher got the better of the defender to score his 10th goal of the season with a deft finish.
Chelsea hit back and Joe Cole found the net in the 56th minute but his effort was ruled offside shortly after a shot from Lampard was blocked.
Laws decided to boost his attacking options three minutes later when Martin Paterson replaced Kevin McDonald.
It was bold move against the league leaders by the former Sheffield Wednesday manager.
Chelsea almost regained their lead in the 64th minute but Jensen got down quickly to parry Lampard's driven free-kick from 25 yards.
The visitors kept up the pressure and the goalkeeper then made a comfortable save from Alex after Malouda and Anelka had linked up.
The crowd was willing their team on though, and could sense another surprise result.
Chelsea boss Ancelotti decided to switch things around in the 73rd minute and brought on Daniel Sturridge for Joe Cole.
Sturridge then saw a header parried by Jensen before Terry silenced the home crowd in the 83rd minute.
Terry peeled away from his marker and got on the end of a corner from Malouda to head home.
However it proved to be Chelsea's winner and takes them four points clear of Manchester United.
Chelsea maintained the momentum and Anelka played the ball back to Frank Lampard a minute later but he skied his shot over the crossbar.
Then Anelka fluffed his effort inside the area to the amusement of the Burnley fans, after good work by Joe Cole.
The home team responded and Robbie Blake thumped a free-kick into the wall in the 17th minute after Michael Ballack had been penalised for a challenge on Chris Eagles.
Back came Chelsea and Florent Malouda delivered the ball into the area only for goalkeeper Brian Jensen to make a comfortable save.
While the visitors were knocking the ball about well, Burnley were holding their own at this stage of the game.
Chelsea made the breakthrough in the 27th minute through Anelka's 12th goal of the season.
It was a sweeping move that caught Burnley flat-footed. Joe Cole delivered a cross to the back post and Malouda chased what looked like a lost cause.
He managed to steer the ball back into the area from the left, and Anelka lost two defenders to coolly finish things off.
It was just the boost Ancelotti was looking for on a ground where Manchester United lost earlier in the season.
It was proving a difficult spell for Burnley but Andre Bikey then rattled a shot over the bar as Terry tried to close him down.
Terry was then booked in the 35th minute for barging over Blake as he tried to burst forward.
The crowd was incensed with the Chelsea defender's challenge and let him know.
Chelsea, though, were playing with confidence and Jensen did well to head clear as Anelka tried to get on the end of a good ball from Branislav Ivanovic.
Blake then sent a free-kick into the Chelsea area after 43 minutes but Anelka showed his defensive qualities by heading clear.
Chelsea started the second half brightly with Malouda advancing and smacking a shot wide of the post in the 47th minute.
However they were stunned three minutes later when Burnley equalised after clever work by Blake.
He put Alex under pressure with a ball into the area and Fletcher got the better of the defender to score his 10th goal of the season with a deft finish.
Chelsea hit back and Joe Cole found the net in the 56th minute but his effort was ruled offside shortly after a shot from Lampard was blocked.
Laws decided to boost his attacking options three minutes later when Martin Paterson replaced Kevin McDonald.
It was bold move against the league leaders by the former Sheffield Wednesday manager.
Chelsea almost regained their lead in the 64th minute but Jensen got down quickly to parry Lampard's driven free-kick from 25 yards.
The visitors kept up the pressure and the goalkeeper then made a comfortable save from Alex after Malouda and Anelka had linked up.
The crowd was willing their team on though, and could sense another surprise result.
Chelsea boss Ancelotti decided to switch things around in the 73rd minute and brought on Daniel Sturridge for Joe Cole.
Sturridge then saw a header parried by Jensen before Terry silenced the home crowd in the 83rd minute.
Terry peeled away from his marker and got on the end of a corner from Malouda to head home.
However it proved to be Chelsea's winner and takes them four points clear of Manchester United.