The replacement’s try on the hour was the only score of the second half and ended up seeing the home side through, but only after Scotland were denied in the final play.
Chasing the win and with penalty advantage, the Scots went for an up-and-under, with winger Sky Phimister speeding through and pouncing on a loose ball.
She dribbled it forward but her final kick through was just too deep, as the ball went agonisingly dead, much to Italian relief.
Italy had made a dream start with a try after just three minutes. From an attacking lineout five metres out, they set up a rolling maul, with tighthead prop Vittoria Zanette bursting through the middle to touch down. Martina Busana added the conversion.
Scotland responded, taking advantage of an Italian offside to get their first points of the game, Lucy MacRae knocking over a penalty on 11 minutes.
Back down the other end, Italy almost had a second, Zanette again at the heart of a rolling maul, but this time she was held up over the line.
Scotland showed some threat of their own, dynamic second row duo Holland Bogan and Natasha Logan combining as they raced out of their own 22 and deep into Italian territory.
They took the lead for the first time on 26 minutes through Nicole Flynn. After spreading the ball wide to Hannah Walker, she broke down the left before feeding Flynn inside her. MacRae converted from close in to make it 10-7.
Italy got their second try just after the half-hour, Aregash Pellizzon coming off the bench and powering over after a tap penalty in the Scottish 22 had been spread her way. Busana could not convert from the left.
And a monster penalty from MacRae swung the game back in Scotland’s favour once more as she made it 13-12.
That was how it remained in the first half, despite a final Scottish opportunity where Walker was well tackled by Elisa Cecati as she looked to be in on the left.
The defences were steadfast in the early stages of the second half, but Scotland’s impressive scrum earned them a succession of penalties and field position.
And yet it took a brilliant try-saving tackle from Gemma Bell on Rubina Emma Grassi after a delightful reverse pass from Nicole Mastrangelo had opened the gap.
It was a signal of the threat Italy could pose, and they took their chance, Copat stepping inside two drifting defenders after Italy had stacked players to the left after a scrum.
Her score on the hour was not converted by Busana but Italy led 17-13.
Phimister had been a threat early in the second half, and she was again after Italy had moved back in front, breaking down the right. But Pellizzon did brilliantly to force a turnover metres from her line.
And it was Phimister who almost stole it at the end, Scotland nearly going from their own half to win the match, only for the bounce of the ball to deny them.