The Easter Road side held on for a 2-1 victory over the Premiership leaders after a late scare