Lady Clark had been urged to dismiss a test case involving Elizabeth Miller, who contracted the bug after heart surgery, but she ruled it should be allowed to proceed.
Many other potential cases are awaiting the outcome of the action, and Lady Clark said: "If numerous claims existed, there may be merit in enabling litigation to be pursued to encourage hospitals to take reasonable care for patients to prevent infection with MRSA."
The judgment was hailed by Mrs Miller's lawyer as a "big step forward" and one that gave hope to hundreds of others. "We have been successful in that Lady Clark has allowed us a final hearing at which we can attempt to prove it was the negligence of the hospital that caused Mrs Miller's MRSA," Cameron Fyfe said.
"We have around 200 other clients and, presumably, there are many others in the country who have contracted MRSA and have potential claims, some well into six figures … people who have died or had amputations. This is a big step forward for them as well. If we win at the final hearing their cases could all go ahead."
Mr Fyfe acknowledged many people might not like the idea of the NHS having to pay compensation, but he stressed that clients often regarded a court action as the final option. "They see it as a means of encouraging health boards to clean up the hospitals rather than face litigation," he claimed. "In the long term, the boards will save money, because the cost of treating people with MRSA is enormous."
Mrs Miller, 71, of Kilsyth, near Glasgow, is suing Greater Glasgow NHS Board for 30,000.
She had surgery in 2001 at Glasgow Royal Infirmary to replace a heart valve and was put on antibiotics for a suspected infection of her wound. Tests identified it as MRSA. She was one of nine patients affected by the bug, and it forced her to have further surgical procedures.
The board denies negligence and asked the Court of Session to dismiss the case, arguing that Mrs Miller was attempting to cite a novel and far-reaching duty of care on a hospital. If it were allowed to continue, the floodgates could open and any patient infected by MRSA would be entitled to a court hearing on the cause of that particular infection.
The board submitted that "very substantial" resources would be diverted from healthcare to legal costs.