But two tries from Alex Dunbar followed by a last-gasp drop goal from Duncan Weir sealed a dramatic comeback win for Scott Johnson's men.
And the 24-year-old Gray, who came off the bench in the third and final Lions Test this summer, hopes this is the start of brighter times for Scottish rugby.
"That was the big focus before the game - we wanted to play rugby," he said.
"We didn't want to go into our shells and kick away possession. So we are still trying things and they paid off.
"It is a good win for us, we responded to a lot of criticism and now it's a building block, but we need to set our own standards and build on from here.
"If you compare it to the game against Ireland, where we conceded before half-time and it was downhill from there, we wanted to show a lot of resolve, we didn't want to stop playing.
"In the first half, things weren't going to hand, but in the second half things went to hand and we're delighted with that."