Saints were left to rue Sam Parkin's miss when through on goal following Samuel's seventh minute opener as Inverness put on a better showing after half-time.
Hayes equaliser was just about deserved, while Adam Rooney went close to winning it for the hosts with a header that crept narrowly wide in the latter stages.
Inverness made one change from the side that had defeated Aberdeen 2-0 in their previous outing, Russell Duncan dropping out to be replaced by on-loan Hibs full back Kevin McCann, who was returning to the side following a groin injury. Dani Sanchez had also recovered sufficiently from a knee problem to take his place amongst the substitutes.
For St Johnstone, there were three alterations to the team which overcame Hibs 2-0 a couple of weeks ago.
Graeme Smith replaced Peter Enckelman in goal as the former Aston Villa man was relegated to the bench along with Jennison Myrie-Williams, who had his place taken by Liam Craig. There was also a start for Andy Jackson, in for Murray Davidson, who dropped out completely.
Following an indifferent start to the season, the visitors had won three out of their last four matches in all competitions and they made a wonderful start in the Highland Capital, taking a seventh-minute lead.
Alan Maybury's long crossfield ball looked more in hope than expectation, but with the Caley Thistle defence caught flat-footed Samuel stole in at the back post to beat Ryan Esson with a crisp finish into the far corner.
Parkin had a chance to put St Johnstone into a two-goal lead as Chris Millar's through ball sent him racing in on goal, but with only Esson to beat he struck his effort straight into the body of the onrushing goalkeeper.
Saints were dominating possession and a thunderbolt from Craig almost caught out Esson as he hurled himself across goal only to see the ball narrowly go the wrong side of the upright.
With Rooney looking isolated upfront, Caley Thistle were growing increasingly frustrated in their attempts to break down a resolute St Johnstone defence.
Michael Duberry had marshalled the Saints rearguard superbly and with the experienced Jody Morris controlling proceedings in the middle of the park, they were worthy of their lead as half-time approached.
There was, however, one scare for St Johnstone before the interval when Ross Tokely headed a Stuart Duff corner back across goal and the ball eventually landed at the feet of Rooney, but he miscued his effort.
St Johnstone showed no signs of letting up at the start of the second half as firstly Jackson whipped a dangerous ball across the face of goal before Samuel's cross was just a shade too long for the run of Parkin.
There was, however, more cut and thrust about Inverness as well and they won a dangerous free-kick on the edge of the box after Richie Foran had been hauled down by Dave MacKay, who was booked, but Rooney thumped the resultant free-kick straight into the wall.
Danny Grainger was then booked for a challenge on Hayes as Caley Thistle began to exert some pressure on the visitors for the first time in the match.
But for all Inverness' dominance in the early stages of the second period, they failed to fashion a chance worthy of the name as Saints made the first change of the match, bringing on Marcus Haber for Parkin, who went off due to a head knock.
The St Johnstone substitute almost had an instant impact as he drove into the box and cut the ball back for Craig, but he blazed his effort high over the crossbar.
Caley Thistle responded by introducing Russell Duncan for McCann with Duff reverting to right back as they tried to salvage an equaliser.
The change clearly had the desired effect as after Graeme Smith had done well to deny Rooney from close range, Inverness equalised in the 71st minute.
Richie Foran's wonderfully-weighted throughball was perfect for Hayes who did well to slip the ball past Smith, who was booked for catching the Irish winger after he had played the ball.
Inverness were now in the ascendancy and from a Duff cross, Grant Munro headed over from six yards.
Rooney was next to go close with his head, this time glancing on a Nick Ross ball into the box only to see it bounce just a yard past the upright.
But both sides had to settle for a point