He said that although he briefed MBIE chief executive David Smol, neither had briefed Government ministers on the complaint but had advised Prime Minister John Key's chief of staff that the contract had ended and would not be renewed because of an issue. He did not detail that issue.
The exchange was apparently sparked after the official questioned some of Mr Gilmore's work towards a paper being prepared, suggesting something was not correct and proposing they meet to resolve it.
Mr Gilmore responded that it was correct and "I'll send you something that proves it."
After a meeting, Mr Gilmore wrote a further email, adding to the end: "You may want to consider your penchant for firing off messages to all in [sic] sundry trying to undermine people simply because you don't agree with them and ignoring facts and reality that exposes ministers to significant risks. Given my background and that I go back into Parliament on the Government side in the New Year, I'm happy to talk about this with you at some stage, as this behaviour is far from productive to good policy making."
The official replied that they were sorry Mr Gilmore had taken questioning as an attempt to personally undermine him, saying they had to be able to "test and challenge" to get the best results.
The official also said they would discuss with others "to talk about how we best work together".
Mr Gilmore replied again, saying "I've worked at Treasury though I saw the light and left as a senior adviser at 24, worked with Ministers as an economic adviser in the Beehive and was the youngest MP on the finance committee last Parliament, and made a few million as a GM in a multinational in the private sector in between.
He added: "So I think I have a reasonable understanding of what Ministers need and what works and how Treasury should operate.
"Treasury's role is a two-way street. Playing games and being secretive, withholding information and then bullying and white-anting people when they don't do what you want is how most people see you and is what I have seen too, not as good Treasury analytic policy maker."
He concluded his email: "I only tell you this as I am sure this sort of thing will come to haunt you if you want your career to reach its potential.
The latest revelation follows a troubling week for the National MP in which he has been put under pressure to resign by the party hierarchy.
Mr Gilmore has been under fire for the last week for his behaviour during a boozy night in Hanmer Springs, which prompted Mr Key to suggest he should resign.
The bottom-ranked MP confirmed yesterday that he would not step down as an MP.