The imperative form of 頑張る used as an encouragement: 'Hang in there! / Do your best! / Go for it!' Commonly used to cheer someone on.
試合前にチームメイト全員で『がんばれ!』と声を出した。
Before the match, all teammates shouted 'Go for it!'
もう一息だよ、がんばれ!
You're almost there — hang in there!
入試の前に友達から『がんばれ』とLINEが届いた。
Before the entrance exam, I got a 'Good luck!' message from a friend on LINE.
疲れている時でも、誰かの『がんばれ』で元気が出ることがある。
Even when tired, someone's 'hang in there' can sometimes cheer you up.