Italy join France and Germany in the knockout stages following the Juventus striker's treble and a late brace from Aurora Galli, which gives Milena Bertolini's side a perfect six points -- three more than both Australia and Brazil -- and puts them both top of Group C and through with a game to spare.
"We never thought we would have got this kind of result at the outset of the tournament," said Bertolini, whose side were among the outsiders before the start of the World Cup.
"Honestly I don't think I could have imagined this a year ago (when Italy secured qualification)."
However the penalty with which Girelli opened her tournament account caused controversy, with referee Anna-Marie Keighley pointing to the spot after a VAR check in the 10th minute for a what looked like a soft foul on Barabara Bonansea.
Girelli then missed the spot-kick, but Keighley allowed her to retake following another VAR check that Jamaica goalkeeper Sydney Schneider had encroached.
The 29-year-old made no mistake the second time round -- two minutes after the original penalty was given -- before doubling Italy's lead 13 minutes later when she bundled home Bonansea's flick-on from a corner.
Girelli became just the second Italian woman to score a World Cup hat-trick just after the break when she beat Schneider to a looping cross.
"I couldn't have even dreamed scoring a hat-trick in the World Cup, it's an incredible personal satisfaction," said Girelli.
Substitute Galli completed the rout, first firing home a long-range effort in the 71st minute before neatly taking Manuela Giugliano's through ball and rounding Schneider to slot home the fifth 10 minutes later.
Italy can now guarantee top spot in the group by getting a result from their final game against Brazil, although their superior goal difference means they can lose and still maintain first place.
'Room for improvement'
Earlier Japan coach Asako Takakura insisted there is more to come from her young team after the Nadeshiko gave their campaign a shot in the arm by beating Scotland 2-1 in Rennes.
Mana Iwabuchi set the 2011 winners on their way and Yuika Sugasawa converted a penalty as Japan closed in on the last 16, just four days after a disappointing display in a goalless draw against Argentina.
Takakura's side will now go into their final Group D game against England, who will qualify for the knockout stages if they beat Argentina later on Friday, with a chance of finishing top and ensuring a more favourable draw in the last 16.
"It was a must-win game and, although there were difficult moments, we needed to be aggressive and score goals, and that is what we did," said the coach.
"We have beaten a wonderful Scottish team, but there is room for improvement so we will discuss how we can get better."
Scotland got a goal back late on through substitute Lana Clelland, but they will be disappointed at offering nothing going forward until it was too late after being 2-0 down at half-time, just like in their opening defeat against England.
"I thought we saw the real Japan today. Their movement was incredible -- we knew it would be, and we tried to set up in a way to stop them," said Scotland coach Shelley Kerr.
"In spells of the game we didn't do that, which sometimes can be understandable because you're playing against world-class players."
Their hopes of qualifying for the last 16 at their debut World Cup are slim before a final group game against Argentina in Paris.