Donegal earned a first win of their Division One campaign as 14-man Kildare suffered a fourth straight loss.
Daniel Flynn's goal gave Kildare an early lead at Ballyshannon but they only led 1-3 to 0-5 at half-time after playing with a strong wind advantage.
Donegal twice led by three only for Kildare to level both times after goals from Niall Kelly and David Slattery.
But Ryan McHugh hit Donegal's decisive goal as his long-range shot deceived Kildare keeper Mark Donnellan.
The Kildare keeper appeared to misjudge the flight of the ball as he allowed McHugh's wind-assisted attempt for a point to drop in over his head and into the net.
The goal put Donegal four ahead and while Kildare hit the closing two points, the home team had done enough.
The match will also be remembered for the bizarre first-half dismissal of Kildare captain Eoin Doyle after he received a second yellow card for a gum shield infringement.
Doyle had already been booked by referee David Gough when he was told to go to the dugout to sort out his gum shield issue but as he was making his way off the field, he reacted to win possession and this resulted in his second yellow card and the end of his contest.
Michael Murphy was handed his first league start of the season but it wasn't until the second half that he began to make an impact on the contest.
Tommy Mollick's run set up Flynn's immediate goal for Kildare and Flynn punched the ball to the Donegal net again a couple of minutes later only for the effort to be ruled out for a square ball.
However, Kildare failed to build on some neat approach work as they fired a series of bad first-half wides as the hitherto quiet Patrick McBrearty hit two points before the break to leave the minimum between the teams.
Donegal wind-assisted in second half
Now with the wind behind them, Donegal hit five out of six scores after the restart with Murphy, Eoghan Ban Gallagher and substitute Shane O'Donnell among the scorers.
However, Donegal's three-point advantage was wiped out as Flynn's run set up Kelly to fire in a levelling second Kildare goal.
Fergal Conway's point then nudged Kildare ahead but scores from Murphy, Ryan McHugh (two) and McBrearty had Donegal three up ahead only for Slattery's first goal to level proceedings once more.
But after the impressive Hugh McFadden restored Donegal's lead, the game's clinching goal then came as McHugh's high ball was misjudged by unlucky keeper Donnellan.
Donegal's defence, which had looked shaky throughout the contest, was almost breached again in the closing stages with substitute Neil McGee having to clear of the line but Declan Bonner's side held on to give themselves a major boost heading into next weekend's game against Tyrone.
|Allianz Football League - Saturday, 24 February|
|Football League - Sunday, 25 February|