Edinburgh had held on to the lead for over an hour as Dougie Fife crashed over in a first 40 that saw three sin bins - two for the Warriors to the hosts' one.
Duncan Weir also had his say in Glasgow's victory, winning his personal kicking battle up against Greig Laidlaw by 15 points to 11.
The Warriors had been a menace on the road this season - with five successive RaboDirect PRO12 away victories - and were the first to put points on the board on a boggy Murrayfield pitch.
Weir drilled through a penalty from halfway with three minutes gone but Edinburgh set about pummelling Glasgow's defence with a forwards drive.
Having won a penalty from an eventual scrum, scrum-half Laidlaw had a simpler task in slotting home his side's first three points from ten metres out.
As soon as Edinburgh replied, however, feet off the ground allowed Weir to stretch his legs again and retake the lead for Gregor Townsend's men.
On the quarter-hour mark, the home side worked the ball to the right corner before Jack Cuthbert popped the ball back into the grateful hands of Fife.
The wing crashed over the whitewash to score in arguably the game's first flowing move - Laidlaw making no mistake with the extras.
Weir did not look like missing each time the kicking tee was brought out and the 22-year-old chopped the lead down to one point when Edinburgh were drawn offside.
Shortly after Tyrone Holmes earned himself a yellow card for tackling a man without the ball while off his feet and Edinburgh were gifted the opportunity to restore a four-point advantage - which Laidlaw duly did.
The hosts were set on piling further misery on the Warriors in Holmes' absence and kicked a penalty to touch after a ferocious rolling maul, but Glasgow held firm.
Tensions were rising and after an altercation involving opposing backs Tom Brown and Hogg, both were sent to the sin bin five minutes before half-time.
Edinburgh were finding acres of space amid a depleted Warriors line and would have found their second try but for Cuthbert's crucial fumble a metre away from the try-line.
Play was called back for a penalty and Laidlaw did the honours for Alan Solomons' troops, but they headed into the interval knowing several try-scoring opportunities had gone astray.
However, the home side emerged for the second half showing the exact same attacking verve as Fife - and then David Denton after play was spread from right to left - were hauled down with the try-line looming.
With 15 men back on the pitch for both sides Hogg in particular was eager to make up for lost time, slipping his way through enemy lines to set Glasgow up ten metres away from the whitewash.
Another costly error at the vital moment put a halt to a try - this time Weir with the wayward pass - though the fly-half returned to stroke through a fourth penalty of the afternoon.
Laidlaw came up just short on the halfway line with a penalty effort of his own but Edinburgh were looking the most likely to grab the all-important second try.
But another period of pressure came and went for the hosts and when Nick De Luca was caught offside, Weir snuck through a long-range penalty with room to spare - dragging Glasgow back to within one point.
The home side roared back and Cornell Du Preez was smothered inches away from the line after misdirection from Laidlaw at the ruck.
One moment of magic was to turn the game on its head on 67 minutes as Scotland international Hogg stormed through to latch onto the end of a perfectly-weighted chip from Dunbar.
Weir skewed the conversion wide but with Edinburgh reeling, the visitors expertly saw the game out by controlling much of the possession in the closing stages.
|Edinburgh Rugby Score Card|
|Glasgow Warriors Score Card|