Trott made a patient half-century to help England recover from two quick blows and reach 171 for three in reply to Bangladesh's 419 on the second day of the second Test on Sunday.
Trott faced 187 balls for his unbeaten 64 and will resume with Ian Bell (25 not out) on the third day with England still trailing the hosts by 248 runs on first innings.
They added 64 runs after Bangladesh made two massive breakthroughs in successive overs by removing Kevin Pietersen and Paul Collingwood.
Pietersen (45) was undone by a short quick delivery from Shakib al Hasan which he spooned to Imrul Kayes at short cover.
Rubel Hossain had Collingwood lbw for a duck in the next over with a hint of reverse swing to leave England stuttering at 107 for three.
England had already lost skipper Alastair Cook, who was caught by Kayes off Abdur Razzak at midwicket for 21.
Bangladesh wasted a chance to dismiss Trott when Jahirul Islam dropped him at forward short-leg off Shakib when the opener was on 13.
Shakib was the most economical bowler in the Bangladesh attack, conceding only 26 runs in 24 overs.
Earlier, tail-enders Naeem Islam and Shafiul Islam scored maiden half-centuries to frustrate the tourists as the hosts battled to their highest ever Test total against England.
Bangladesh resumed on 330 for eight and batted for more than 24 overs in the morning session to add 89 runs.
It was Bangladesh's third highest total against any side, behind the 488 against Zimbabwe at Chittagong in 2005 and 427 against Australia at Fatullah in 2006.
Off-spinner Graeme Swann claimed the last wicket shortly before lunch when he trapped Rubel Hossain lbw for 17 to finish with figures of four for 114.
Naeem added 26 runs to his overnight total to remain unbeaten on 59 after facing 172 balls and hitting eight fours.
Shafiul raced to his first Test fifty off 47 balls before falling to seamer Tim Bresnan for 53, ending a ninth-wicket stand of 74.
England lead the two-match series 1-0.
Bangladesh First innings (overnight 330-8)
T Iqbal c Prior b Tredwell 85
I Kayes b Finn b Broad 12
Z Siddique lbw b Swann 39
J Islam lbw b Swann 0
Mahmudullah c Collingwood b Finn 59
S Hasan lbw b Tredwell 49
M Rahim c Prior b Bresnan 30
N Islam not out 59
A Razzak lbw b Swann 3
S Islam c Prior b Bresnan 53
Rubel Hossain lbw Swann 17
Extras: (b-1 lb-10 nb-2) 13
Total: 419 (117.1 overs)
Fall of wickets: 1-53, 2-119, 3-122, 4-167, 5-226, 6-254, 7-301, 8-314, 9-388, 10-419.
Bowling: Broad 18-5-69-1 (nb-1), Bresnan 21-7-57-2, Swann 36.1-5-114-4, Finn 10-2-61-1(nb-1) Tredwell 31-5-99-2, Collingwood 1-0-8-0
England first innings
A Cook c Kayes b Razzak 21
J Trott not out 64
K Pietersen c Kayes b Shakib 45
P Collingwood lbw b Rubel 0
I Bell not out 25
Extras: (b-5 lb-8 nb-3) 16
Total: 171 for 3 (64 overs)
To bat: M Prior, S Broad, T Bresnan, G Swann, J Tredwell, S Finn.
Fall of wickets: 1-29 2-105 3-107
Bowling: Shafiul 6-2-13-0, Razzak 19-3-69-1, Shakib 24-15-26-1, Mahmudullah 4-1-8-0, Rubel 10-0-37-1 (nb-3), Naeem 1-0-5-0.