DTH van der Merwe crossed twice, with Rob Harley grabbing the other, as the Warriors had three scores on the board as early as the 25th minute and a 17-0 advantage.
However Edinburgh, led by an outstanding display from Greig Laidlaw who notched three penalties, fought back with a score of their own from Piers Francis.
And it was that fightback, as well as the performance of Scotland international Laidlaw, that means Townsend is far from sitting pretty ahead of the return clash on December 29.
"I thought Greig Laidlaw was outstanding for Edinburgh and what a class player he is, playing at nine for the first time in a while," said Townsend.
"He made things tick and he saved them with a great tackle on Sean Maitland and almost scored himself.
"They were a dangerous team. They were certainly up for the game and came back well in the second half."