Wales shook off the disappointment against England to record a third win from their last four visits to Murrayfield.
“This was a test of character for all of us and we had to rise to the challenge,” said Gatland.
“Players and coaches are going to be under pressure at the highest level of sport and it’s how you respond. That’s what makes you a man and you have to be excited about having your back to the wall.
“The boys could have easily lacked confidence because they’ve been under the pump but they fronted-up.”
Shane Williams scored in either half to close-in on yet another record. His brace saw him move to within two tries of the all-time record of 24 Championship tries held by Scotland’s Ian Smith.
Fly-half James Hook also kicked 14 points while Wales denied Scotland from crossing the try line, despite being reduced to 13 men with a huge defence effort.
“We played very well in the first 20 minutes and then we put ourselves under huge pressure with the two yellow cards. But we showed great character to hold out, even when we went down to 13 men. We defended incredibly well, took our chances and thoroughly deserved to win,” added Gatland
“Our loose-forward trio were absolutely outstanding. We learned a lesson from the way the Scots back-row played against us last year.
“Sam Warburton has learned has learned so much from his experiences of playing against the best teams in the world and is potentially turning himself into a world-class number seven.”