Shelley, who won silver four years ago in Delhi, became the first Australian to win the Games marathon for 20 years and the first to claim consecutive medals in the event since Steve Moneghetti in 1990 and 1994.
Kenya's Stephen Chemlany clinched silver and Abraham Kiplimo of Uganda took bronze, both winning the first medals for their countries in Glasgow.
It was also Uganda's first Games medal ever in the men's marathon.
More Kenyan medals followed soon afterwards when Daniel capped an excellent performance to win gold ahead of compatriot Caroline Kilel.
Australia Jess Trengove added to her country's burgeoning medal tally when she crossed the line for bronze to cheers from a large crowd on a drizzly day in Scotland.
"I've got to pinch my self, it is very exciting," Shelley told reporters.
"To come back and actually win is indescribable. Now I have had a bit more experience, to come away with my first win is indescribable.
"You just try to run the best you possibly can and it was a dream to be honest. I'm still buzzing, I can't believe it. It probably wasn't until a kilometre out that I got a bit of a feeling.
"I just kept pushing on. My main idea was to stay relaxed and I was always there in the lead group. At 35 kilometres there was a surge. I just had to stay strong and it paid off."
- Sports & Recreation
- Steve Moneghetti
- Abraham Kiplimo