Second half display proves pivotal in Gorgie