The 33-year-old got on the end of Shaun Miller's corner to score for the first time in 493 career appearances.
Roche almost netted in the first half, his long clearance saved at full stretch by opposite number Ryan Fulton.
Portsmouth went ahead when Kal Naismith ran through the Shrimps' midfield, cleverly finding Gareth Evans who finished smartly from 12 yards.
Roche's leveller halted Morecambe's three-game losing streak in the league, while Pompey move up to fifth in League Two.
Match ends, Morecambe 1, Portsmouth 1.
Second Half ends, Morecambe 1, Portsmouth 1.
Goal!  Morecambe 1, Portsmouth 1. Barry Roche (Morecambe) header from very close range to the bottom right corner. Assisted by Shaun Miller with a cross following a corner.
Corner,  Morecambe. Conceded by Ryan Fulton.
Attempt saved. Lee Molyneux (Morecambe) left footed shot from the centre of the box is saved in the bottom left corner.
Andrew Fleming (Morecambe) wins a free kick in the defensive half.
Foul by Gary Roberts (Portsmouth).
Shaun Beeley (Morecambe) is shown the yellow card for a bad foul.
Foul by Shaun Beeley (Morecambe).
Kyle Bennett (Portsmouth) wins a free kick on the right wing.
Attempt blocked. Paul Mullin (Morecambe) right footed shot from outside the box is blocked.
Foul by Andrew Fleming (Morecambe).
Kyle Bennett (Portsmouth) wins a free kick in the defensive half.
Shaun Beeley (Morecambe) wins a free kick on the left wing.
Foul by Adam McGurk (Portsmouth).
Delay in match Ben Close (Portsmouth) because of an injury.
Foul by Lee Molyneux (Morecambe).
Ben Close (Portsmouth) wins a free kick in the attacking half.
Substitution, Portsmouth. Adam McGurk replaces Marc McNulty.
Substitution, Morecambe. Lee Molyneux replaces Jamie Devitt.
Attempt missed. Jamie Devitt (Morecambe) right footed shot from a difficult angle and long range on the left is high and wide to the right.
Attempt blocked. Jamie Devitt (Morecambe) right footed shot from outside the box is blocked.
Jamie Devitt (Morecambe) wins a free kick in the defensive half.
Foul by Ben Close (Portsmouth).
Substitution, Morecambe. Paul Mullin replaces Kevin Ellison.
Attempt blocked. Jamie Devitt (Morecambe) right footed shot from outside the box is blocked.
Substitution, Portsmouth. Gary Roberts replaces Michael Smith.
Substitution, Portsmouth. Kyle Bennett replaces Kal Naismith.
Kevin Ellison (Morecambe) has gone down, but that's a dive.
Andrew Fleming (Morecambe) wins a free kick in the defensive half.
Foul by Marc McNulty (Portsmouth).
Corner,  Portsmouth. Conceded by Shaun Beeley.
Attempt blocked. Kal Naismith (Portsmouth) left footed shot from outside the box is blocked.
Andrew Fleming (Morecambe) is shown the yellow card for hand ball.
Hand ball by Andrew Fleming (Morecambe).
Attempt blocked. Ben Davies (Portsmouth) right footed shot from outside the box is blocked.
Foul by Adam Dugdale (Morecambe).
Kal Naismith (Portsmouth) wins a free kick in the defensive half.
Corner,  Portsmouth. Conceded by Adam Dugdale.
Corner,  Portsmouth. Conceded by Andy Parrish.
Morecambe goalkeeper Barry Roche headed home a 94th-minute equaliser to deny Portsmouth all three points.