The Warriors struggled to utilise their most potent attacking threats.
"We didn't look after the ball well enough," Townsend told BBC Scotland.
"We lost too many balls in the tackle area and gave away two or three penalties which gave them an easy way back into the game."
Townsend was impressed by the magnitude of the fixture, played before a record 23,642 crowd.
"I thought it was a great occasion, there was a real intensity, the atmosphere was fantastic," he said.
"To get over 20,000 to a club game in Scotland is a testament to the appetite for professional rugby in Scotland, and Edinburgh played well and deserved to win."
The Warriors' defence pleased their head coach, but it was their lack of accuracy with the possession they won that frustrated Townsend.
"I thought both teams showed a real intensity - it takes two teams to play like that," he stated. "I thought (flanker) John Hardie was outstanding and key in a lot of the balls Edinburgh won.
"In general, we defended well. I thought in parts of the first half, it was about the best we've defended this season. We just didn't build on that and didn't do enough with the balls we won back from Edinburgh."
Glasgow Warriors head coach Gregor Townsend was disappointed by his side's failure to retain possession and build phases as they slipped to a 23-11 loss to rivals Edinburgh at Murrayfield.