The Russian appeared as if she would complete a comeback win when, after dropping the opener, she replied to level the match at a set apiece in California.
There were six consecutive breaks at the start of the contest, and Giorgi, who is currently ranked number 79 in the world, grabbed the decisive seventh to go 5-3 ahead and then serve out for the set.
The second followed a more traditional pattern as the two players exchanged serves until Sharapova broke at the third attempt in the sixth game, having stormed into a 40-0 advantage.
Although her Italian opponent would find a break of her own, Sharapova responded immediately to earn parity in the contest, and then survived a scare to hold in the opening game of the third.
However, Siorgi broke four games later, and having served to love in straight games, looked to be taking control of the encounter before three consecutive breaks saw the set levelled at 5-5.
There would prove to be one more twist, as Siorgi broke for an eighth time during the near two-and-three-quarter-hour duel, which the underdog went on to win 6-3 4-6 7-5.