Leon Osman lashed in a last-minute winner as Everton maintained their push for a Champions League place.
Kevin Campbell and James McFadden saw early strikes blocked before Everton skipper Alan Stubbs rose to head Thomas Gravesen's corner in at the far post.
Yakubu levelled two minutes later with a powerful drive into the top corner while Patrick Berger forced home keeper Richard Wright into a string of saves.
But with seconds left, Osman smashed home a left-foot half-volley to win it.
The home side made four changes to the side beaten 5-2 at Tottenham - captain Stubbs returned from a back injury, while Gary Naysmith, Leon Osman and Kevin Campbell also came in.
Dejan Stefanovic was back in the Portsmouth line-up after recovering from a calf injury.
McFadden was at the centre of Everton's best attacking moments early on and he created an excellent chance for Kevin Campbell after beating half the Portsmouth side on a mazy run down the left.
But when he finally laid the ball off to Campbell, Arjan de Zeeuw blocked the striker's 15-yard effort.
McFadden then cut inside Stefanovic but his fierce drive smacked into De Zeeuw amid loud appeals for a penalty from the home fans for handball against the Pompey defender.
In a rare foray forward by the visitors, Berger came close to giving Pompey the lead - he collected the ball in midfield before unleashing a 30-yard drive which Wright did well to claw to safety.
But with chances in open play few and far between, it was inevitable that the opening goal would come from a set-piece.
Pompey's Steve Stone needlessly conceded a corner with Shaka Hislop about to claim the ball and from Gravesen's in-swinging delivery, Stubbs rose well at the back post to head past a static Hislop.
The lead lasted barely two minutes though as Yakubu levelled with a stunning strike.
The Nigerian forward collected a quick throw-in down the left and held-off countryman Joseph Yobo as he powered into the box before unleashing a powerful left-foot half-volley into the roof of the net.
There was still time for Berger to graze the crossbar from 25 yards before half time.
After the break, Cahill looked certain to put Everton ahead from Osman's back-post cross, but his downward diving header from three yards out somehow bounced over the bar.
Moments later, Berger was again given the freedom of Goodison Park and his low 30-yard drive was spilled by Wright, but the Everton stopper reacted quickly to deny Yakubu.
McFadden flashed a volley over from eight yards, Cahill stabbed wide from six, and Hislop dived to his right to keep out Gravesen's well-struck 20-yard shot as Everton dominated the closing stages.
And their endeavour was rewarded in the final minute when Osman pounced on a loose ball in the box and smashed a half volley past the bewildered Hislop to secure Everton's 12th victory by a one-goal margin.
Everton: Wright, Hibbert, Stubbs, Yobo, Naysmith, Carsley, Osman, Gravesen, Cahill, McFadden (Kilbane 74), Campbell (Bent 73). Subs Not Used: Pistone, Weir, Turner.
Goals: Stubbs 29, Osman 90.
Portsmouth: Hislop, Primus, De Zeeuw, Stefanovic, O'Neil, Faye (Cisse 73), Stone, Quashie, Berger, Yakubu (Taylor 85), Kamara. Subs Not Used: Unsworth, Ashdown, Mezague.
Goals: Yakubu 31.
Ref: P Walton (Northamptonshire).