Passing sentence, Mr Justice Cooke said the seriousness of the crime lay between manslaughter and murder.
He told Catt: "What you did was end the life of a child that was capable of being born alive by inducing birth or miscarriage.
"What you have done is rob an apparently healthy child, vulnerable and defenceless, of the life which he was about to commence."
The judge said Catt would have been charged with murder if the baby had been born a few days later and she had then killed him.
"The child in the womb was so near to birth, in my judgment all right-thinking people would think this offence more serious than unintentional manslaughter," he said.
The judge noted that her husband was "highly supportive" but she had not told him about the pregnancy.
Police urged Catt to reveal where she hid her baby's body so they could bring a "compassionate conclusion" to the tragic case.
Catt, of Sherburn-in-Elmet, North Yorkshire, pleaded guilty in July to administering a poison with intent to procure a miscarriage.
She showed no emotion during the hour-long sentencing hearing as the court was told that she gave a child up for adoption in 1999, terminated one pregnancy with her husband's agreement, tried to have another termination but missed the legal limit, and concealed another pregnancy from her husband before the child was born.
When she became pregnant again in 2009, she told her lover what had happened and ended the affair shortly afterwards, before resuming it in June 2010, after she had aborted her baby.
The court heard that Catt had an appointment for a consultation at a Marie Stopes abortion clinic in March 2010, but a scan the day before showed that she was 29 weeks five days pregnant and so too late for a legal termination.
She then made a series of internet searches, including "Where can I get an illegal abortion?" and "Inducing an abortion at 30 weeks", before ordering a supply of the drug misoprostol.
Police arrested Catt in September 2010, but she insisted to officers that she had undergone a legal termination six months earlier despite being nearly 30 weeks pregnant at that stage.
Frances Oldham QC, mitigating, described the case as "highly unusual" and said Catt was a "supportive and loving" mother to her two children.
The barrister said Catt had asked her to tell her husband and children that she was sorry and said she would "never forgive herself" for the effect her actions had had on her family.
"It's a burden she will bear for the rest of her life," she said.
Chief Inspector Kerrin Smith, who led the investigation for North Yorkshire Police, said after the hearing that Catt had proved to be a "cold and calculating" liar who had shown no remorse and provided no explanation for what she did.
"I only hope now that Catt has been sentenced and has the time to reflect on her actions, that she will reveal where the body of her baby is, so that we can ensure a compassionate conclusion to this very sad investigation," he added.