An 109th-minute goal from Liverpool substitute Suso had looked to have booked their passage, until Bamford struck.
Then came the amazing shoot-out, which started with Bamford missing Boro’s first kick – and then Raheem Sterling also failing later for Liverpool.
Bamford atoned later on to incredibly make it 11-11, Suso converted for 14-13 and when Albert Adomah blasted wide Liverpool just sneaked through.
If Rodgers had hoped to witness likened by Robbie Fowler last season to a young Steven Gerrard, will remember the evening when he scored from 30 yards, to become the second youngest goalscorer in the club’s history after Michael Owen.
Yet fairy tales are not normally associated with the third round of this competition and Liverpool’s persistent failure to keep clean sheets allowed Middlesbrough’s Adam Reach to head an equaliser shortly after an hour.
When Liverpool manager Brendan Rodgers was first mapping out his teams in advance for this, the fourth game of five matches inside two weeks, he is unlikely to have had Rossiter’s name pencilled in.
Yet injuries meant opportunity knocked for the youngster and a boost to morale ahead of Saturday’s Merseyside derby, his side, bereft of leaders and lacking incision, instead continued to make life difficult for themselves.
This was another poor performance, characterised by the host’s shaky foundations, which raised more questions than supplied answers about the direction in which Liverpool are heading.
Liverpool debutant Jordan Rossiter, just 17 and he wasted little time in seizing the moment. Middlesbrough had conceded just three goals in their previous five matches, but were at sixes and sevens in dealing with Lucas’s clipped pass which Raheem Sterling chased down.
Keeper Jamal Blackman and Kenneth Omeruo, both on loan from Chelsea, contrived to get in each other’s way, giving Rickie Lambert, captain on his full debut, a chance that was saved.
When the ball bounced back off Blackman, it was not simply Rossiter’s alertness to the chance which caught the eye but his technique to calmly thread a shot, first-time, through a crowded penalty area and into the net from 30 yards.
Boro responded and Grant Leadbitter’s corner was cleared by Rossiter but only as far as Lee Tomlin, who thundered a right-foot volley from 22 yards that forced a diving Thomas Mignolet to push it away.
link live football update