The woman asked Court of Appeal judges to overturn Mrs Justice Lieven's decision.
Three appeal judges are considering the case at a Court of Appeal hearing in London.
Mrs Justice Lieven concluded that a pregnancy termination was in the woman's daughter's best interests on Friday after analysing evidence at a hearing in the Court of Protection, where issues relating to people who lack the mental capacity to make decisions are considered, in London.
Bosses at an NHS trust responsible for the woman's care had asked Mrs Justice Lieven to let doctors perform an abortion.
Three specialists, an obstetrician and two psychiatrists said a termination was the best option because of the risk to the woman's daughter's psychiatric health if pregnancy continued.
They said the woman's daughter's behaviour could pose a risk to a baby.
Specialists also said taking a baby from the woman's daughter would cause greater psychiatric harm than terminating the pregnancy.
The woman's mother, a former midwife, was against termination and said she could care for the child.
A social worker who works with the woman's daughter said the pregnancy should continue.
Lawyers who represented the woman's daughter also said she should be allowed to give birth.
But Mrs Justice Lieven, who is based in the Family Division of the High Court, said a balance of evidence showed that termination was the best option.
She said she had to make an "enormous" decision on the basis of what was in the woman's daughter's best interests - not on "society's views of termination".
Barristers John McKendrick QC and Victoria Butler-Cole QC, who represented the woman at Monday's appeal hearing, said Mrs Justice Lieven's decision was wrong and should be overturned.
Judges have heard that the woman's daughter, who is in her twenties and 22 weeks pregnant, has the mental age of a child aged between six and nine.
They have been told that the woman's daughter has been diagnosed with a "moderately severe" learning disorder and a mood disorder.
Mrs Justice Lieven had considered the terms of the 1967 Abortion Act, which says termination may be performed up to the 24th week of pregnancy, and the 2005 Mental Capacity Act before reaching a decision.
She heard that the "circumstances of the conception" were "unclear" and a police investigation was ongoing.
Judges have ruled that the woman's daughter, who lives in the London area, cannot be identified in reports of the case.
They also say the NHS trust which asked for a decision, and the council which employs the social worker, cannot be named because publication of their names might create an information jigsaw which could lead to the woman's daughter's identity being revealed.
Stay up to date with the latest news stories from a Christian perspective. Sign up to our daily newsletter and receive more stories like this straight to your inbox every morning.