Forest got off to a flyer as Harewood marked his return to the starting line-up with the opening goal after just four minutes.
David Johnson flicked on Eoin Jess' corner and Harewood headed in from close range.
However, the Gills were back on terms two minutes later as player-manager Andy Hessenthaler was on hand to beat Darren Ward in the home goal from Chris Hope's cross.
Harewood was brought down in the area after 17 minutes by Roland Edge and the striker coolly converted from the spot to make it 2-1 to Forest.
Johnson and Harewood were denied by visiting keeper Jason Brown before Forest extended their lead.
Johnson turned home a third six minutes before the interval, with Harewood and Mathieu Louis-Jean involved in the build-up.
After the break, the visitors rarely threatened to get back into the game and Johnson almost added his second of the night.
However, it fell to Harewood to round off a perfect night with 25 minutes to go as he completed a hat-trick and wrapped up a 4-1 win.
Kevin James had the best chance to pull a goal back eight minutes from time, but shot wide when well placed
Nottm Forest: Ward, Louis-Jean, Dawson, Walker, Brennan, Bopp, Williams, Prutton, Jess, Johnson, Harewood. Subs: Hjelde, Roche, Doig, Lester, Reid.
Gillingham: Brown, Saunders, Ashby, Hope, Edge, Smith, Hessenthaler, Shaw, James, Ipoua, Perpetuini. Subs: Bartram, Leon Johnson, Rose, Pennock, Awuah.
Referee: R Pearson (Co Durham)