The Clarets had gone ahead just before the half-hour mark when Jay Rodriguez converted Ashley Westwood's peach of a pass.
That was, however, as fruitful as it got for the Clarets, who had led against their Championship opposition at the break.
The Terriers drew level with just over a quarter-of-an-hour remaining when Matt Lowton was robbed of possession on the halfway line and Sorba Thomas crossed for Josh Koroma to convert from close range.
The visitors then turned the tie on its head in the 87th minute when substitute Thomas was once again the provider as defender Matty Pearson powered a header home from his corner.
James Tarkowski almost forced extra-time in the closing stages, but the centre back failed to keep his header on target when unmarked from Westwood's set-piece.
Here are the ratings.

5. Ben Mee 5
Steady away at the back, but beaten to Sinani's set-piece by Russell in the closing stages of the first half, with the midfielder's header coming back off the post. Dealt with balls in from the wide areas easily enough and came out on top in the 50/50s he contested.

6. Aaron Lennon 5
Slipped an incisive slide-rule pass alongside Sarr and into the path of Rodriguez in the first half, but largely ineffective on the right hand side. Blazed over from outside the penalty area after the break and reverted back to a number 10 role in the latter stages.

7. Josh Brownhill 4
Completed the home side's unfamiliar pairing on the left and struggled to make an impact. Failed to challenge Pipa or Pearson when getting on the ball, lacked quality in possession, though a hopeful ball forward in the first half almost paid dividends when Schofield and Lees collided.

8. Ashley Westwood 5.5
Played a peach of a pass into Rodriguez for the opener, dropping the ball in the hinterland between goalkeeper and defence. Also put the ball on a plate for Tarkowski with a late free kick, but the defender headed over unmarked with the goal gaping.

