The National Audit of Dementia found some improvements since its first analysis of care in England and Wales in 2011.
But it says too few patients have their mental state assessed, and information is often not shared properly.
The Alzheimer's Society said a "culture change" was needed to improve care further.
The audit, commissioned by the Healthcare Quality Improvement Partnership (HQIP), was led by the Royal College of Psychiatrists' Centre for Quality Improvement in partnership with other organisations.
It looked at data from 210 hospitals across England and Wales, including case notes for 8,000 patients with dementia.
Many people with the condition become very confused when they are admitted to hospital.
But the audit found only half had their mental state assessed, and even fewer were checked for delirium - a state of mental confusion - rates it said were "alarmingly low".
The authors said: "Delirium is associated with greater risks of longer admission, hospital acquired infections, admission to long term care, and death.
"Failure to assess and plan for mental health needs may also prevent appropriate assessment and care for physical health needs."
In addition, a third of hospitals did not have guidance available to staff on how to involve the patient's carer and how to share information.
Flaws were also found with patient notes, which often failed to include information that could have helped staff communicate with them  - and with poor discharge information.
At board level, the audit said, hospital trusts failed to do enough to review the quality of care for people with dementia.
Two in five hospitals did not provide dementia awareness training to new staff.
However, since the last audit report in December 2011, some improvements were found.
There has been a 10% drop in the overall number of prescriptions of antipsychotic drugs, and patients are now more likely to receive an assessment of the food they are eating.
Prof Peter Crome, who led the audit's steering group, said he was pleased there had been improvements since the 2011 report.
But he added: "Much still needs to be done and there remains a large gap between what hospitals say should happen and what actually does happen."
Prof John Young, the government's National Clinical Director (or tsar) for Integration and the Frail Elderly, who advised the audit, said: "Hospitals are at last engaging with the special care requirements necessary to support people with dementia and their families."
George McNamara, head of policy and public affairs at the Alzheimer's Society, said: "Given that people with dementia occupy a quarter of hospital beds, it is scandalous that improving dementia care is not a top priority for a number of hospital managers."
He said hospitals must do more to give staff the training they needed to look after patients with dementia better.
Dr Peter Carter, general secretary the Royal College of Nursing, said: "A recent RCN report found that specialist dementia nurses can reduce the length of hospital stays, prevent readmissions and provide education and leadership for other staff.
"We must not deny our most vulnerable patients these improvements in care, and dementia specialist nurses should be a top priority."
Many dementia patients fail to have the proper checks when they are in hospital, an audit of care has found.