The visitors introduced three substitutes for the second-half and there was an immediate change of fortune as Raftery curled over his second point within a minute of the restart.
The Whitehall Colmcille player added a two-pointer three minutes later as Westmeath’s lead was trimmed to four points but the hosts regained control of matters through a trio of unanswered points by Murray, Tom Weir and Conor Cleary.
Trailing by Double scores, Dublin were in need of some inspiration at this stage and it duly arrived through the familiar figure of Raftery, who left Tom McCaul helpless in the Westmeath goal with an arrowed shot into the bottom corner following an incision from deep by Bobby Doyle.
Andy McDonnell looked busy when introduced and kicked a deserved point at the start of the final quarter before Raftery edged the visitors in front by the 50th minute as he kicked a brace of sumptuous two-pointers in quick succession.
Crucially, the momentum swung back in Westmeath’s favour in the closing stages as a Connaire point preceded a fine solo goal from Kelly, who raced clear before placing an emphatic finish across Jamie Galvin.
Kelly added a point in the 59th minute and while Dublin placed some late pressure on the home goal, it failed to generate the required scores to spare them their fate.
Dublin will conclude their group stage when travelling to Longford on Tuesday, 14th April.
Scorers – Dublin: C Raftery 1-8 (1 F2, 2 P2); J McCaghy, J Heavey (f), C O’Dwyer, A McDonnell 0-1 apiece. Westmeath: D Kelly 1-2; S McWade 0-5 (1f, 1 P2); D Murray 0-4 (1 P2); A Connaire 0-2; A Mullen Adamson, T Weir, C Clancy 0-1 apiece.
Dublin: J Galvin; D Lombard, A Becton, F Carroll; C Doran, J McCaghy, B Doyle; C O’Carroll, C Raftery; E Brangan, M Salami, C Reilly; E Madden, J Heavey, C O’Dwyer. Subs: A McDonnell for Reilly (half-time), M Morrison for Brangan (half-time), A Davis for Carroll (half-time), C Wilde for Salami (64).
Westmeath: T McCaul; T Wier, T Brennan, L Dillon; G Staunton, E Daly, C McKeogh; M Monaghan, B Stenson; D Kelly, D Murray, C Cleary; S McWade, A Connaire, A Mullen Adamson. Subs: F Brennan for Monaghan (43), H Hughes for Mullen Adamson (52), J Murtagh for McKeogh (56), R Brady for Weir (61).
Referee: Colum McCullough (Louth).