The 30cm-long blade narrowly missed Juacelo Nunes' left eye and passed through his mouth into the right side of his jaw, the G1 news website reported.
"The knife passed through several nerves and veins, structures that can quickly kill a patient" said Gilberto Albuquerque, the director of the hospital in Teresina.
He added that the 39-year-old was recovering surprisingly well.
Mr Nunes also suffered two knife wounds to his throat, shoulder and chest when he was stabbed after an argument at the party in Agua Branca, more than 60 miles from Teresina, in northeastern Piaui state.
The knife was removed and given to police who are investigating the attack, the doctor told G1.
The motorcycle taxi driver said he got into a dispute with a man who then called three others to attack him.
"I did not see the moment of the stabbing, but at no time fainted and remained conscious even with pain," he said.
"I thought I would die and only came to believe when I saw what happened to me, because if someone told me I would not have believed it."
Mr Nunes' wife said she was shocked when she saw him with the knife in his skull.
"I did not believe when I saw my husband like that," Francisca Pereira said. "I thought he was going to die. It was a miracle."
The couple now plan to spend New Year at home with their family.