Sharaz Najib, who is serving a life sentence, attacked the officer on the landing in C-wing in HMP Wakefield, Leeds Crown Court was told.
The 33-year-old had been instructed to go back go his cell for lockdown but told the officer he was going to make a phone call on the afternoon of August 7 last year.
When the officer put her arm across to block his path, he took a step back in an aggressive stance like he was preparing to fight, prosecutor Austin Newman said.
The officer called for back-up and when other officers tried to restrain him, Najib got an arm free and punched the female officer to the head, knocking her down.
He later admitted getting into a fight but said he could not remember punching the woman.
She was taken to hospital where she was found to have a minor fracture to her cheekbone. She also had black eyes and soft tissue damage to her face.
A personal impact statement read out to the court detailed how she had to endure a liquid diet for months, was struggling to sleep, had reduced sensation in her face and had discolouration around the area where the punch connected.
The court was told that Najib has nine convictions from 16 offences, including a conviction for causing actual bodily harm and multiple robberies dating back to when he was a juvenile.
In July 2019, he was convicted of rape and robbery and handed a life sentence with a minimum of 10 years.
Najib appeared in court a via video link from HMP Frankland in Durham, where he was moved after the attack.
He admitted a charge of maliciously inflicting grievous bodily harm on the prison officer in Wakefield.
Mitigating, Nicholas Worsley said: "It was spontaneous and short-lived.
"His record does him no credit and this will impact on his assessment by probation in his assessment for his potential for rehabilitation.
"He is contrite, and he apologies to the complainant through me. He never meant for this injury to be caused but he accepts he must be punished for it."
The judge, Recorder Anesh Pema said: "You acted in a way that caused a prison officer to seek back-up. Even with the arrival of those officers, you did not back down."
Najib was jailed for 18 months, to be served consecutively to his life sentence. It means that when he is eventually granted parole, his latest prison sentence will start.