But the Ospreys, who had only won one of their last nine fixtures with the Warriors, rallied late with Dan Evans crossing the whitewash and Sam Davies converting.
The result means reigning GUINNESS PRO12 champions Glasgow Warriors remain eighth in the table and Townsend admitted it was a case of mixed emotions after seeing a sixth league victory of the season slip through their fingers.
"I was really pleased with the way we started the game," he said.
"You would expect the home team to come out the blocks but we got into the right areas on a number of occasions in the first-half, but we're probably disappointed we didn't get more points on the board through that territorial dominance.
"I felt in the second-half we carried on where we left off and it was a very competitive game. We built that seven-point lead but we probably needed another three points and a bit more control in their 22 to see out the game.
"We missed too many tackles at the end which gave Ospreys the try and a bit of hope that they could win the game and we have to improve our discipline as we gave Ospreys some easy outs by giving away penalties."
To buy tickets for the GUINNESS PRO12 Grand Final click here. Also 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.