There's actually a "syndrome" related to having your blood pressure taken, known as "White Coat Syndrome", which basically means you have an aversion to doctors, or medical staff. Can stretch from giving you slightly raised blood pressure, to blacking out, like you say, which is caused by very elevated blood pressure. It's also known as White Coat Hypertension.
It could have happened because you're subconciously thinking about the operation, but it could have been made worse by not eating enough that day, or being stressed over other things.
Did the doctor say you had high blood pressure when you had it taken?