The visitors had Raven sent off after just 11 minutes after he caught Rowan Vine in a committed challenge around 30 yards from goal.
Caley boss Terry Butcher was furious with the decision but the referee had no hesitation in dismissing Raven and handing St Johnstone the initiative.
The Saints immediately applied pressure with their man advantage through Gregory Tade, who clipped the woodwork with an effort from close range.
Mehdi Abeid then struck the bar with a curling drive from a tight angle as Inverness just did enough to stay level at the interval.
Inverness showed spirit to defend and looked comfortable for much of the second half, keeping possession from deep.
Nigel Hasselbaink came on for St Johnstone and he was heavily involved as the deadlock was finally broken 14 minutes from time.
His driving run and cross down the left wing found Steven MacLean, who made no mistake with a header from close range.
The visitors were unable to respond late on as the Saints held firm to claim a vital home victory in the fight for Europa League qualification.