Gloucester saw off a strong challenge from Edinburgh to triumph 23-12 in a hard-fought Heineken Cup encounter at Murrayfield.
The home side took an early lead when Greig Tonks collected the ball and crossed the line in the fifth minute.
However, Gloucester were level in the 11th minute when Rob Cook gathered Henry Trinder's kick and raced away from the home defence.
Two tries either side of half time from Martyn Thomas seemed to have given the visitors an unassailable lead, but David Denton reduced the arrears with more than 25 minutes remaining.
However, the home side were unable to capitalise and Gloucester went away victorious.