The enigmatic Gers attacker’s fine close-range finish in the 27th minute was out of kilter with a poor first-45 minutes and the game swung further towards the visitors in the 71st minute when Saints skipper Steven Anderson was sent off by referee Don Robertson for picking up his second yellow card, for a foul on Rangers striker Alfredo Morelos.
James Tavernier again provided the assist for Pena’s second in the 78th minute with another fine cross from the right before midfielder Graham Dorrans added a third to take the visitors to within three points of Celtic and Aberdeen, who both play on Saturday.
The scoreline perhaps flattered Gers whose boss Pedro Caixinha made two changes, one enforced for the trip to Perth.
Rangers midfielder Jason Holt replaced suspended Ryan Jack while experienced Portuguese defender Bruno Alves returned from a calf injury as captain with Ross McCrorie dropping to the bench.
There was no place for Kenny Miller, who missed the defeat of Hamilton amid reports of a heated team meeting. Caixinha had said the striker was under consideration but claimed before kick-off that an injury had kept him out.
Saints top-scorer Michael O’Halloran was ineligible to play against his parent club, while former Gers defender Richard Foster began a two-match suspension.
Tommy Wright’s side had the first real chance of the game in the 22nd minute. A slack pass by Rangers wide-man Daniel Candeias to Dorrans was intercepted by St Johnstone midfielder Murray Davidson and Graham Cummins found himself racing through on goal.
With Alves closing in on the striker, his shot from inside the box was tipped over by Gers goalkeeper Wes Foderingham for a corner, which came to nothing.
The visitors were more clinical when their opportunity arrived. Ibrox right-back Tavernier took a pass from Morelos and when his cross from the right went over the head of the in-rushing Colombian striker, Pena volleyed high into the net at the back post.
The Perth side worked their way back into the game and a minute before the break a St Johnstone corner fell to Cummins at the back post but he looped his effort over the bar.
The home side came smartly out of the blocks at the start of the second-half but could have been two goals behind in the 53rd minute when Josh Windass’s header - after a Daniel Candeias free-kick was cleared - got through to Morelos.
However, the striker’s shot on the turn from eight yards was blocked for a corner by St Johnstone keeper Alan Mannus, with Saints surviving the set-piece.
Rangers’ best move of the match involving Tavernier and Candeias ended with Pena turning the cut-back inches past the post.
Again Saints came back and Rangers had to withstand a mostly aerial siege which lasted several minutes before they could break free.
The advantage swung further towards the Govan side when Anderson, booked earlier along with Alves, was shown a second yellow card after clambering over Morelos.
That advantage was stretched in the 78th minute when Pena headed in another deep cross from Tavernier before Dorrans, who had a minute earlier smacked the crossbar with a drive, swept in a Holt cross to seal the points.