Arsenal were losing 2-1 when Pepe came on in the 75th minute and he scored five minutes later with a curling effort from 25 yards.
He repeated the feat in stoppage time as Arsenal avoided their second straight defeat and retained their place at the top of Group F.
Former Tottenham youngster Marcus Edwards had earlier cut inside and fired into the bottom corner to give Vitoria a shock lead, before Arsenal’s Brazilian teenager Gabriel Martinelli nodded in his fifth goal in just his third start to make it 1-1.
Bruno Duarte restored the visitors’ lead on 36 minutes, pouncing on a rebound to send Arsenal into the half-time break a goal behind.
The Gunners, who were poor for large patches of the game, burst into life in the final 10 minutes as Martinelli was denied from close range before Rob Holding’s header was well held by the goalkeeper.
Arsenal manager Unai Emery made 10 changes from the side that lost to Sheffield United in the Premier League on Monday but was forced to bring on Matteo Guendouzi and Dani Ceballos at half-time, before Pepe made the difference.
There was huge excitement this summer when Arsenal signed Ivory Coast winger Pepe from Lille for a club record fee of £72m.
He showed glimpses of brilliance against Liverpool on his first Premier League start in August and picked up an assist in the following game against Tottenham.
But the winger has been largely underwhelming and needed to make an impression from the bench in this European tie.
And that is exactly what he did, curling both set-pieces past a helpless Miguel Silva to give Arsenal another three points in the group, as they maintained their 100% record in the competition this season.
Late goals ease pressure on Emery
Former Arsenal defender Martin Keown said on BT Sport at half-time “pressure is building” on manager Emery.
Fans were booing as the players walked off at the break trailing 2-1 and banners displaying the words “Emery out” and “Unai, stop freezing Ozil out” were seen in the stands.
German midfielder Mesut Ozil was not included in the squad and has made just two appearances this season.
The defeat to Sheffield United on Monday looked set to be repeated even after Emery had ruthlessly pulled off youngsters Ainsley Maitland-Niles and Joe Willock at half-time but Pepe had other ideas.
And despite discontent, Arsenal remain fifth in the Premier League table and unbeaten in all three matches in Europe this season.
‘Pepe can gain confidence’ – Emery
Arsenal manger Unai Emery to BT Sport: “Our aim in this competition is to top the group. Each match is a chance to use different players and grow experience and little by little get better. We didn’t play like we wanted but we showed good spirit. It’s a good victory. Some players need experience and playing under pressure at this level.
“It’s important for Pepe. He can gain confidence from tonight. When he scores it’s good for him and the team. He’s getting better, playing minutes, playing matches and scoring goals like tonight and he helped us tonight to win this match.”