Officers attended the Royal Edinburgh Hospital in the Morningside area of the city at around 4pm yesterday.
It was described as an “isolated incident”.
A 49-year-old man was arrested following the incident and will appear at Edinburgh Sheriff Court today.
A 43-year-old woman and a man, 48, sustained ‘superficial’ injuries, according to police.
Superintendent Kenny MacDonald said: “Police cordoned off an area around the Royal Edinburgh and Astley Ainslie Hospital while inquiries were carried out.
“I’d like to thank the public for their patience during this time.”
Tim Montgomery, director of operations, Royal Edinburgh Hospital and Associated Services, NHS Lothian, said: “We can confirm that an incident took place in the grounds of the Royal Edinburgh Hospital earlier today.
“This was an isolated incident and no other patients or staff were injured. Patient safety remains our main priority and we will continue to help Police Scotland with their inquiries.”