Last season's runners-up took control after leading 6-3 at half-time following an opening half spoiled by torrential rain.
Paddy Jackson outshone home kicker Peter Horne with the boot and Niko Matawalu's try came too late to spark a comeback.
Townsend said: "I thought we were competitive in the first half then just couldn't get going.
"Ultimately indiscipline led to them getting points on the board. They have got a strong line out and that helped them get out of reach.
"The game was there for both teams in conditions like that, to take a grip and just didn't in the second half."
Glasgow led 15-0 in their opener at Northampton before succumbing to defeat and Townsend has not given up hope.
The former Scotland international, who was without the likes of Sean Lamont and Duncan Weir through injury and lost Byron McGuigan (ribs) and Horne (concussion) tonight, said: "We have got four games to play and we'll have to win all four to qualify.
"I believe we have got a group of players who are capable of doing that.
"By the time the games come around in December we should have a bigger squad with the players coming back from injury."
Ulster head coach Mark Anscombe praised his side's attitude after they took control when the rain subsided.
He said: "It's not easy to come here and get a victory as other teams I'm sure will find out.
"We showed a lot of character out there, the boys battled their way through tough conditions against a very good team.
"You have got to be able to work through things because the game of rugby doesn't always go the way you want it.
"If you don't have that character and attitude to hang in there and battle through the tough times, you won't come out the right end.
"We have done that a few times this year, and shown there is a bit of character there. That's a good benchmark to build a good team from."
Gilbert has released a new line of rugby cleats. The Gilbert Virtuo 8S is part of the exciting new product. Check it out.
The entire All Blacks apparel line has been updated for 2013/14. Check out the New Zealand All Blacks polo.
The Nike Tiempo is a solid rugby cleat and one of few styles still made from full-grain natural leather.
The Gilbert Blitz 8S rugby cleat is a great cleat at a great price of $69.99. Get a new pair of cleats today.
A cool looking all black rugby cleat with the high performance adidas is known for. Get in the Gear!
Wear the crest of the British and Irish Lions on your t-shirt. A great look for the summer.
The All Blacks Performance t-shirt is black with hints of blue from the training jersey. Very Cool.
The New Zealand All Blacks training jersey for 2013/14. Get in the Gear!
The USA Rugby Pro Alternate rugby jersey is perfect for any fan of the Eagles. Get yours to wear during the summer Test matches.
The NEW All Blacks 2013/14 jersey has arrived at World Rugby Shop. Dare to wear the colors of the All Blacks.