Donal Lenihan's 1-05 haul stole a surprise victory for Meath in Navan to keep their hopes of promotion from Division 2 of the Allianz football league alive.
Galway were hot favourites as league leaders with an unbeaten record and led by three points with ten minutes remaining in an exciting game that swung from end to end.
But Kevin Walsh's Connacht champions couldn't hold on as Meath finished strong with Lenihan's 66th minute goal putting the hosts into a lead they wouldn't relinquish.
Cillian O'Sullivan had a strong game for Meath too along with Donal Keogan and Padraic Harnan as the hosts secured a morale boosting win in what has been an up and down campaign so far.
Meath began the afternoon in a perilous position locked on two points at the bottom of the table with Fermanagh and Down.
They were coming off the back of a dispiriting Round 3 defeat to Down last weekend when the Mourne County ended their 14-game losing streak at Meath's expense.
Galway hinted at another long day for Meath when they opened up a fifth minute 0-02 to 0-00 lead with points from Barry McHugh.
But they only added two more points for the rest of the half and went 25 minutes between their scores from Paul Conroy in the 16th minute and Michael Daly in injury-time.
That was partly down to Meath 'keeper Paddy O'Rourke, who saved from Eamonn Brannigan while Shane Walsh pulled another goal chance just wide.
O'Sullivan has been Meath's best attacker so far under new boss Andy McEntee but was taken off against Down and seemed to have a point to prove.
He continuously probed for holes in the Galway defence and kicked two excellent scores while Lenihan went one better with three from play.
Meath supporters turned out in noticeably fewer numbers but couldn't have asked for much better than a 0-08 to 0-04 half-time lead against the 2016 All-Ireland quarter-finalists.
Galway were much improved in the third quarter though and outscored the hosts by 0-04 to 0-01 in the 10 minutes after the restart to cut the deficit to just one.
Daly hit his second point and McHugh added two more from frees during the scoring siege and the margin was wiped out entirely in the 54th minute when Galway finally drew level at 0-10 to 0-10.
Captain Gary O'Donnell nailed the equaliser from way out on the right wing and they took the lead for the first time since the 18th minute when McHugh pointed a free.
It was all Galway now and their fifth point in a row left them sitting pretty with a 0-13 to 0-10 lead on the hour mark.
But it was Meath who finished strongest and points from captain Graham Reilly and Lenihan reduced the gap to the minimum before Lenihan seized on a long pass from O'Sullivan to fire home the crucial goal from close range.
Meath: P O'Rourke; D Keogan (0-01), C McGill, D Tobin; W Carry (0-01), B Power, P Harnan; B Menton, J Toher; R O Coileain, C O'Sullivan (0-02), A Forde (0-01); B McMahon, G Reilly (0-02), D Lenihan (1-05, 0-01f).
Subs: S Tobin (0-01, 0-01f) for McMahon, E Wallace for Forde, A Flanagan for Toher, C O'Brien for E Wallace (black card), J Wallace for O Coiliean, M Burke for Carry (black card). Tobin black card, not replaced.
Galway: R Lavelle; D Kyne, D Walsh, C Sweeney; G O'Donnell (0-01), G Bradshaw, L Silke (0-01); P Conroy (0-03, 0-01f), F O Curraoin; T Flynn (0-01), M Daly (0-02), E Brannigan; S Walsh (0-01), B McHugh (0-05, 0-01 45, 0-03f), M Lundy.
Subs: D Cummins for Lundy, J Heaney (0-01) for Daly, G Sice for McHugh. Cummins black card, not replaced.
Referee: M Deegan (Laois).