Gallagher penalty wins it in a thriller for Brave