Gillespie, of the Zenith Swimming Club, won the 10km women's event, by just 0.34sec from Australian Kate Dryden, in an epic sprint to the finish.
After pulling away from the rest of their rivals, the pair went stroke-for-stroke in the final 100m as they fought for the national championship.
As she reached out to touch the finishing line, Gillespie was hopeful she had done enough to secure gold.
``I was pretty confident that I'd got the win, even though it was really close. I've had a few finishes like that where I'd come second, so it was nice to finally get a win,'' she said.
Gillespie finished with a time of 2hr 11min 59.22sec, a personal best over the 10km open water course.
Runner-up Dryden was just centimetres behind her with a 2hr 11min 59.56sec time.
Defending title-holder Charlotte Webby was a late withdrawal.
``I was definitely feeling a lot more confident with Charlotte not racing but it was still a tough battle out there,'' Gillespie said.
Gillespie has little time to relax and reflect on her national title victory because the Australian championships loom at the end of this month.
``I go to Adelaide in a couple of weeks for the Australian open water championships, and I've learnt a lesson from last year, when I swam both events [the 5km and 10km races] here and didn't have anything left in Australia.''
The New Zealand open water championships attracted more than 900 swimmers, including a strong international contingent.