Abortions are illegal in Ireland except in cases where the mother's life is endangered.
The teenager, who is four months pregnant, has already been told her baby has anencephaly, a condition that prevents the brain from properly developing.
Doctors have said the baby is likely to live for only three days after being born.
Last week the HSE softened its stance towards the Leinster teenager, known only as Miss D, by saying it would allow her to travel to the UK if a district court judge and her mother consented.
At the high court today Mr Justice Liam McKechnie said there were no statutory or constitutional grounds to stop the teenager from leaving Ireland.
It is thought that more than 7,000 Irish women travel to places outside the republic to end unwanted pregnancies every year.
Click here to run an energy price comparison, and see if you could be paying less for your gas and electricity.