But the visitors and hot favourites were so lucky to escape Mullingar with victory and a place in the July 9 decider.
Westmeath never actually led as they chased a place in a historic first final but blew it with missed chances and a wasted penalty late on.
Top scorer and senior star Niall O’Brien won a 56th-minute penalty when the scores were tied but his shot was saved. Boland, who had earlier scored a goal, punished Brian Hanley’s side with the winning point in the three minutes later.
Paul Winters opened the scoring for Dublin from a free just seconds into the contest, doubling his tally soon after. Then came a Caolan Conway point before Colm Cronin’s fifth-minute goal for the visitors.
The strike put Dublin 1-3 to 0-2 ahead and apparently in the driving seat.
But four Westmeath scores in a row levelled it up and set the tone for a tit-for-tat encounter. Those quartet of scores came from senior ace O’Brien and Aonghus Clarke, who notched two apiece, and they levelled the game at 0-6 to 1-3.
Westmeath, crucially, finished the half stronger with scores from O’Brien, David Fennell and Rob Greville. They were still tied at 0-9 to 1-6 but the hosts had vital momentum on their side.
Dublin almost got a bizarre goal five minutes after the restart. Wing-back Eoghan O’Donnell skidded a long-range shot in off the wet turf and the ball almost sneaked past the keeper. Westmeath, however, couldn’t take advantage and fired three morale-sapping wides in a row.
They were then rocked by a 42nd-minute Boland goal which put Dublin 2-6 to 0-9 ahead. Winters’ fourth of the evening soon after put Dublin four ahead.
Westmeath simply refused to wilt though, and four O’Brien frees in a row remarkably left it level again, 2-7 to 0-13.
It set up a thrilling finale and Westmeath had a great chance when O’Brien was awarded his penalty. But he blew the opportunity and Dublin capitalised through Boland with the winner.
Scorers for Dublin: C Boland 1-1, P Winters 0-4 (3f), C Cronin 1-0, C Conway 0-2, A Clabby 0-1.
Scorers for Westmeath: N O’Brien 0-8 (7f), R Greville and A Clarke 0-2 each, D Fennell 0-1.
DUBLIN: C Dooley; S McClelland, C O’Callaghan, M McCaffrey; E O’Donnell, R Murphy, C Crummy; D Gormley, C Robinson; C Cronin, K O’Flynn, P Winters; C Conway, A Clabby, O O’Rorke.
Subs: C Boland for Conway (h/t), A Jamieson Murphy for O’Donnell (44), T Devlin for Gormley (47), F McGibb for O’Flynn 52.
WESTMEATH: K Glennon; P Fennell, T Doyle, L Varley; G Greville, T Gallagher, M Heeney; D Fennell, D Lynch; R Greville, A Clarke, D Higgins; N O’Brien, C Scally, J Boyle.
Subs: N Kirby for Scally (52), Scally for D Fennell (55).
Referee: K Brady (Louth).