Glasgow were clearly still smarting from losing last season's Grand Final to Leinster as tries from Peter Horne, Jonny Gray and Josh Strauss handed the Warriors a 19-0 lead.
However penalties from Ian Madigan and Jimmy Gopperth moved Leinster closer and tries through Jack McGrath and Tom Denton saw the visitors take the lead.
But Stuart Hogg knocked over a last-gasp penalty to earn Glasgow a 22-20 win, and to leave Townsend grinning from ear to ear.
"It was a great win, we were playing against the champions and to get any win against them is obviously a massive boost for us," he said.
"There was a drop-off in the second half but I was really pleased with our intent to start the game. We looked sharp, played real high tempo rugby and came close to scoring more than 20 points in that first half.
"The second half didn't flow for both teams - there was a strong wind and we didn't deal with it that well. We did drop-off in that last ten to 15 minutes but I'm delighted with the effort at the end and the character to come back and win was excellent.
"There were some nicely worked tries in that first half and I thought the support play was really good. I thought our forwards and backs combined well and it was great to see us scoring three tries.
"We want to play that fast, exciting brand of rugby and Leinster want to play the same way and when they get their game going it becomes a great game."
Click here for the best images from Scotstoun
Follow us on Facebook, join the conversation on Twitter, sign up to ourYouTube channel for extensive match highlights and sign up for our newsletterfor regular updates on the GUINNESS PRO12
Guinness PRO12
Suite 208, Alexandra House,
The Sweepstakes
Ballsbridge, Dublin 4, Ireland