Rangers, trailing 1-0 from the first leg, got off to a flying start when full-back James Tavernier put them ahead in the second minute, sliding in at the back post to connect with a ball from Joe Aribo.
Roofe had an effort disallowed for the Scottish side but a minute before the break, Braga's Vitor Tormena was ruled to have brought down Roofe inside the box and French referee Francois Letexier sent off the defender and awarded a penalty.
Tavernier kept his cool and converted the spot kick to make it 2-0 on the night and 2-1 on aggregate at the break.
Roofe had another effort ruled out, and Rangers paid the price for the lack of sharpness in front of goal seven minutes from the end of regulation time when David Carmo rose to head in a corner.
In the 11th minute of the extra period, however, Roofe sealed the contest, slotting home a low cross from the excellent Aribo.
It was a moment of madness that left Carlos Carvalhal's side two men down and Rangers should have put the contest beyond doubt but substitute Scott Arfield sent a glorious chance over the bar from point-blank range.
Rangers, who were relegated to the Scottish third tier after financial problems 10 years ago and only returned to the top flight in 2016, last reached this stage of a European competition in 2008 when they lost to Zenit St Petersburg in the UEFA Cup final.
"It's unbelievable, it means so much to everybody here. It's a special night," Roofe said.
"I had two disallowed, one off the crossbar, I thought it was going to be of those nights for me but the fans demand it so we have to produce it."