Police spokesman Inspector Daniel Mavimbela said the accused man had already spent eight months in custody after bail was denied.
The 25-year-old woman had falsely accused a 42-year-old man of rape after her uncle found she had had sex with the man.
During sentencing, Magistrate Pierre Laurens told the woman she had put the man through shame through her false accusation.
"You must be ashamed of yourself, the only sentence I can think for you is a prison sentence, you are sentenced to three years," said Laurens.
The woman had pleaded guilty to the charge of perjury. Her sentence gives no option of a fine.
The falsely accused man was a tenant at the woman's uncle's house in Atteridgeville.
In October last year the woman was apparently having consensual sex with the man, when her uncle heard noises from the room.
"He could not convince his tenant to open the door, so he called the police," said Mavimbela.
"It is reported that this woman feared the uncle and alleged she was raped after the police forced the door open."