edit
There's an Add-on available that removes the header or footer in the active document only once added:
Documents by Top Contributors

Goto your Google Document and choose from the menu Add-ons > Get add-ons... and search for:

Affiliation: I wrote the add-on
The following line of code will reset the header (gray line disappears).
Code
function onOpen() {
DocumentApp.getUi().createMenu("Header / Footer")
.addItem("Reset header", "resetHeader")
.addItem("Reset footer", "resetFooter")
.addToUi()
}
function resetHeader() {
try {
DocumentApp.getActiveDocument().getHeader().removeFromParent();
} catch(e) {
throw "No header present !!";
}
}
function resetFooter() {
try {
DocumentApp.getActiveDocument().getFooter().removeFromParent();
} catch(e) {
throw "No footer present !!";
}
}
Screenshot
before

after

Note
I've noticed that after running the script (and thus removing the header or footer), adding them wasn't possible on the document I was working on.
Add the code under Tools > Script editor..., press the bug button to authenticate the script and then press the play button. This will "play" the code and reset the header.
edit
See Google Help Forum for an extensive walk-through: How to remove the header in Google Docs?