Parents Chris Gard and Connie Yates have launched a final legal challenge at the European Court of Human Rights after a Supreme Court challenge failed.
European judges said doctors were required to keep the 10-month-old alive until they had passed judgement.
Specialists at Great Ormond Street believe he has no chance of survival.
Charlie has been in intensive care in hospital since October last year.
His doctors said he cannot hear, move, cry or swallow and that his lungs only go up and down because he is on a machine that does it for him.
Judges in Strasbourg, France, had previously ruled an interim measure to keep him alive should remain in place until midnight on 19 June.
The new extension lasts until a final ruling is made.
A spokesperson said the court "will treat the application with the utmost urgency" but have not indicated when the final judgement will be made.
Charlie's parents, from Bedfont, west London, have raised Â£1.3m on a crowdfunding site to pay for an experimental treatment in the US.
In April a High Court judge ruled against the trip to America and said Charlie should be allowed to die with dignity.
Three Court of Appeal judges upheld the ruling in May and three Supreme Court justices have dismissed a further challenge by the parents.
Charlie is thought to be one of 16 children in the world to have mitochondrial depletion syndrome, a condition which causes progressive muscle weakness and brain damage.

"Unprecedented pressure" at Yeovil District Hospital means 80 operations have been cancelled in two weeks.
A temporary ward with 24 extra beds was opened in February to cope with winter pressures - but that is also full.
Deputy chief executive Jonathan Howes told the BBC:  "Every part of our capacity has been filled."
The 345-bed hospital serves a population of about 185,000 - largely in south Somerset, North and West Dorset and parts of Mendip.
It has already been on "black alert" - meaning there are not enough beds to cope with numbers coming in to A&E - twice this winter, in January and February.
Dr Howes said the pressure was partly explained by the area's ageing population, many of whom have "multiple conditions". There has also been "respiratory conditions" circulating in schools and workplaces.
"That, combined with pressures felt in other parts of the system so that we can't discharge people from hospital, has caused the acute crisis right now."
"We are always under pressure but the last fortnight has seen the busiest period in our history.
"This has been an on-going issue, we have had the highest number of attendances in our emergency department on record, up in the 170s - we normally see about 130. This has been sustained over the last fortnight. "
With the "added pressure" of the Easter weekend ahead, the hospital is urging people to "think carefully" before going to A&E - as a "significant number" of those who have been in casualty could have been treated elsewhere, at minor injuries units, GP walk-in centres or by calling 111.
Terminally-ill baby Charlie Gard must continue to receive life support until judges make a ruling on whether he should undergo a trial treatment.
[NEXT_CONCEPT]
A Somerset hospital has declared its third "black alert" of the winter as doctors say they are dealing with the "busiest fortnight in our history".