Heritage minister John Penrose said the austere Georgian edifice was "an eloquent reminder of one of the grimmer aspects of London's 18th-century social history."
He said the building had been given Grade II listed status, meaning it can't be demolished and any redevelopment must take account of its "special architectural and historic interest."
The run-down building in central London had been slated to be replaced by a new housing development, but local residents and academics fought a campaign to save it.
The young Dickens lived nine doors away and scholars say the sights and sounds of the building were probably the basis for the workhouse where orphan Oliver is incarcerated in his 1838 novel.
Advisory group English Heritage said the building also was significant for its links to Victorian social reformer Joseph Rogers, the workhouse's medical officer.
He was so alarmed by conditions at the workhouse where hundreds of destitute people worked at menial jobs in return for basic shelter and a diet of gruel that he began a campaign for better care for London's poor.
Nick Black, a medical historian who campaigned to save the building, said the government's decision was "fantastic news."
He said that if the building were demolished, "London would have lost the last well-preserved workhouse infirmary from the 18th century."
"And combined with the house nine doors away where Dickens lived it would have lost what is potentially a valuable heritage site which the city should be looking to exploit for tourist income."
Opponents have 28 days to ask for a review of the decision, but successful challenges are rare.