Ulster fly-half Ian Humphreys got the better of a first-half kicking duel with opposite number Finn Russell, as the hosts took a 15-6 lead into the interval at the Kingspan Stadium.
Russell then reduced the deficit to six points before two tries in just over ten minutes from Craig Gilroy and Tommy Bowe secured the Irish province a 29-9 victory and moved them up to third.
The game was overshadowed by a potential serious neck injury to Glasgow centre Mark Bennett, who was stretchered off on the hour after being caught at the bottom of a ruck.
But although the Warriors failed to make it six consecutive triumphs, Townsend saw enough in his side's attacking performance to believe they will continue to cause every team problems this season.
"In the first half I thought we were in their half a lot more than they were in ours and that was down to some very good attacking play," Townsend told the club website.
"I thought our effort in defence was superb and we just didn't seem to get the rub of the green with the penalties and Ulster just nudged ahead.
"I did feel in the second half we were getting back into our game again and I thought we would lift it up in the last 20 minutes.
"But unfortunately after Mark Bennett's injury we made a couple of errors and suddenly we had conceded 14 points, which is very hard to come back from.
"I was pleased with a number of aspects but there is a lot we still need to work on. It's important we finish games strong and we didn't tonight and Ulster got a deserved win."
Click here to see the best images from Ulster's triumph over Glasgow Warriors
Follow us on Facebook, join the conversation on Twitter, sign up to our YouTube channel for extensive match highlights and sign up for our newsletter for regular updates on the GUINNESS PRO12
Guinness PRO12
Suite 208, Alexandra House,
The Sweepstakes
Ballsbridge, Dublin 4, Ireland