Hospital inspectors had to intervene during ward visits after becoming concerned about the way patients were being cared for.
The unannounced inspection at the Royal Infirmary of Edinburgh focused on care for elderly people, particularly with dementia.
Problems were found with how staff maintain patient dignity, how meals are organised and with the "unhelpful" ward environments.
Healthcare Improvement Scotland (HIS) said NHS Lothian must make 23 improvements.
The inspectors stated: "We are concerned about how staff are making sure patients' dignity and comfort are maintained at all times in the combined assessment area. This is a mixed-sex area and patients can be there for a number of days before being discharged or transferred to a ward. We had to intervene on three occasions whilst inspecting this area of the hospital."
On meal-times, they added: "Patients who needed help with their meals waited for a long time before that help was provided. We had significant concerns about the provision of meals across several wards and how some patients were assisted to eat their meals. On a number of occasions, we had to intervene and ask staff to provide help for patients at meal-times."
Melanie Hornett, nurse director at NHS Lothian, said: "I would like to apologise to patients who have experienced care that was below the standard we expect.
"We already have a number of polices and procedures in place to improve care for older people in our hospital and the inspectors did identify areas of good practice. But it is clear that we need to do more to ensure that these polices and procedures are being carried out consistently across all areas. We have reviewed the inspection team's findings and have a detailed action plan in place to address the issues raised."
Labour MSP Duncan McNeil, convener of the Scottish Parliament's Health Committee, said the report highlights a serious situation. He said: "We need to get a grip on this serious situation or elderly patients in wards across the country will continue to be put at risk."
Scottish Conservative health spokesman Jackson Carlaw said: "NHS Lothian cannot simply brush this report off with glib words about trying to make a change. When failings like this are uncovered, urgent action and accountability are needed and can't be swept under the carpet."