The youngster showed great composure to drill the ball beyond Yves Ma-Kalambay from 16 yards after collecting goalkeeper Lukasz Zaluska's clear-out.
United had taken the lead in the 28th minute through Warren Feeney but Hibs striker Steven Fletcher equalised five minutes before the break. Chris Hogg, Hibs skipper for the day, was sent off with five minutes to go.
Dundee United pressed Hibs during the early exchanges and won a corner after Danny Swanson raced to the goal-line and forced Hogg into a challenge.
Swanson took the corner himself and his set-piece caused panic in the six-yard box with Ma-Kalambay, in his first appearance since January, refusing to come from his line but the ball eventually drifted wide.
After a slow start from the hosts, they created their first chance of the game in the seventh minute.
Derek Riordan found Denes Rosa inside the box but the Hungarian's left-footed shot from an angle was well wide of the near post.
United then came close to breaking the deadlock in the 12th minute from another Swanson corner.
Dods' close-range header came back off the bar and Grainger's header from the rebound was cleared off the line by Lewis Stevenson.
At the other end Steven Fletcher teed up strike partner Jonatan Johansson from six yards and the Finn's flick to the near post was expertly saved by Zaluska.
Hibs took the lead in the 28th minute from a corner that led to Feeney blasting in from close range.
Grainger knocked Swanson's far post corner back into the area and Dods headed the ball to the Northern Irishman who volleyed the ball into the net from under the bar.
United were not content with taking the lead and went about trying to score another.
The lively Swanson was in the thick of the action during United's next move in the 38th minute.
The winger raced past David Van Zanten and Hogg before swapping passes with Caddis on the edge of the area but his lofted shot cleared the bar.
Hibs were back on level terms five minutes before the break through Steven Fletcher. Johansson did the hard work to create room for a cross and Fletcher strolled in at the back post to stab the ball into the gaping goal.
Just like they did at the start of the game, United made a bright start to the second period with Swanson flashing a long-range effort just wide of the post from 18 yards.
After an ineffective performance in attack, United striker Andis Shala was the first player to be substituted in the match in the 60th minute when he was replaced by Goodwillie.
Swanson then wasted another chance for the visiting team in the 64th minute, hitting a free kick from the edge of the area well over Ma-Kalambay's bar.
The midfielder then set up Garry Kenneth with an inviting pass across the box and the defender's curling effort from an acute angle was parried clear by Ma-Kalambay.
Dundee United striker Goodwillie thought he had a good shout for a penalty after Ma-Kalambay collided with the player inside the box but the near-side assistant referee instead pointed for a corner.
Levein's side were handed another chance to test the goalkeeper with a free-kick in a similar position to their previous set-piece.
Craig Conway worked a short free-kick but his shot was closed down and blocked.
Ma-Kalambay did well to block Conway's 18-yard powerful shot before then getting down to a scuffed effort from Feeney.
Hibs were reduced to 10 men in the 86th minute when referee Stevie O'Reilly showed Hogg a straight red card for a late tackle on Conway at the touchline.
The drama was not finished there as Goodwillie scored a winner two minutes before the end. The marksman was found with a long clear out from Zaluska and drove a low shot past Ma-Kalambay from just inside the box.