A goal from Asa Hall and a Dean Moxey penalty, both in extra time, wrapped up the tie after Ruben Rodrigues and Adam Chicksen had twice levelled for the visitors.
Torquay stormed into the lead with just one minute on the clock when a header by Wright from a Joe Lewis cross went in via a deflection off defender Chicksen.
The visitors were level six minutes before the break as Rodrigues headed in from a cross by Dion Kelly-Evans.
Torquay retook the lead three minutes into the second half as Wright slotted home his second at the far post following a cross by Adam Randell.
But the advantage lasted only three minutes when Chicksen fired in off the underside of the bar at a corner.
Both sides had chances to win it but extra time was needed and with 11 minutes gone a Jake Andrews corner was headed in by Hall as Torquay led for the third time.
As the first period of extra time drew to a close, Moxey made it 4-2 to the home side from the penalty spot to make sure of a place in the final at Ashton Gate against Stockport or Hartlepool.