On a wild night in Glasgow, with the Ibrox pitch again in a terrible state, it appeared Gers were set to slip up as the Portuguese visitors grabbed a two-goal lead.
First Braga's Brazilian skipper Fransergio tamed the conditions with a stunning long-range opener before on-loan Barcelona striker Abel Ruiz added a clinical second.
But Rangers refused to lie down as they hit back to preserve Steven Gerrard's 15-game unbeaten home run in Europe as Light Blues boss and take a major step towards the last 16.
Hagi got the fightback started as he reduced the deficit before playing a part in Joe Aribo's equaliser.
And the Romania international then had his dad – former Real Madrid and Barcelona great Gheorghe – cheering from his seat in the Ibrox directors' box along with the rest of the jubilant Gers faithful as his late deflected free-kick crept into the net to seal a narrow victory.
However, Gerrard's team will have to rely on-loan Hibernian striker Florian Kamberi to spearhead their attack in the second leg after Alfredo Morelos was booked, meaning he is ruled him out of next Wednesday's trip to Portugal.
Braga were denied the traditional eve-of-match training session and were instead forced to put in their final preparations at Gers' Hummel Training Centre on Wednesday as the hosts sought to protect a pitch still recovering from its Storm Dennis battering.
But while the hosts seemed to slip and slide with every step early on, the visitors simply glided over the muddy surface.
There were two early warnings as first Bruno Viana stuck the rebound off an Allan McGregor parry into the side-netting before Francisco Trincao – the £26million striker who will join Barcelona this summer – fizzed just wide.
Rangers were making life hard for themselves as they failed to keep hold of the greasy ball.
And when Glen Kamara gifted possession after 11 minutes, Braga's response was merciless. Paulinho and Joao Palhinha regathered before working it the ball to Fransergio, whose sensational 30-yard strike seemed to ride the wind on its way into McGregor's postage-stamp corner.
In between those chances, however, the hosts had spotted an obvious flaw in the Archbishops' high-pressing defence.
Pushing up, they left themselves vulnerable to the ball over the top and nearly paid an early price as Ryan Kent came within a toenail of converting a Morelos ball. The home side continued to probe in behind.
Hagi twice sent Morelos scampering through on goal, once with a poked through ball before the second a lovely diagonal which fooled Galeno into swiping at fresh air. But on both occasions Rangers' top-scorer found himself foiled by goalkeeper Matheus.
Ibrox held its breath as another swipe of Trincao's left foot crept just wide six minutes before half-time.
And they let out an almighty groan as Morelos saw yellow for the barge on Bruno Viana that now sees him banned for his fourth game this year already.
Fransergio almost doubled Braga's lead just after the break as another long-range beauty shook McGregor's crossbar.
But there was more frustration for Morelos after 57 minutes as he somehow failed to convert Hagi's cross from point-blank range.
That miss was compounded three minutes later as Braga pounced again. Trincao's clever flick took Niko Katic out of the equation and Ruiz drove forwards, unleashing an explosive right-footed drive low past McGregor.
But it was Hagi who took on the responsibility of lifting a crowd that had fallen quiet.
He saw a deflected strike clawed away by Matheus but his next effort after 67 minutes was perfectly placed to beat the keeper as it clipped the inside of his left-hand post to send the volume levels soaring.
He then combined with Aribo after 75 minutes as the Nigeria midfielder wriggled past four defenders before slotting home the leveller at the near post.
But the roar that met that strike was nothing compared to the one that followed with eight minutes remaining as Hagi's set-piece took a wicked bounce off the wall to wrong-foot Matheus and spark wild celebrations round Ibrox.