NHS Tayside was slammed by patients' groups over the move, which resulted in 20 people a day being turned away from Ninewells Hospital in Dundee on Tuesday and Wednesday.
The board said it had been left in a very challenging situation because of a significant increase in patients with viral conditions including norovirus.
They said beds were in short supply because bugs had left many acutely ill. Ninewells has had up to 90 people admitted every day with viruses in recent days.
Lesley McLay, NHS Tayside's chief operating officer, said: "Unfortunately, the decision has had to be taken to cancel non-urgent routine elective surgery. We very much acknowledge the distress this will have caused and apologise for this."
Margaret Watt, from Scotland Patients Association, said: "It's totally unacceptable. NHS Tayside could have predicted an admissions spike at this time of year and should have had contingency plans in place.
"Cancelling surgeries should be a last resort."
Ross Kelly, who was due to undergo surgery on his shoulder this week, said he was given 16 hours notice of the cancellation.
He said: "The NHS just phoned to say my operation has been cancelled for the foreseeable future.
"To say I'm raging would be an understatement. I'm furious. If I can't get it this week I can't get it this year."
John Boland, Unite branch chairman for NHS Tayside staff, said: "My understanding is norovirus is accounting for a lot of the admissions.
"This is also affecting our community nursing, with a lot of them going off with the virus."
An NHS Tayside spokeswoman added: "For the last week, for Ninewells Hospital, we've had 80 to 90 unscheduled adult admissions a day."