To persevere or do one's best; to make a strong effort and keep going until the end.
期末試験に向けて毎日がんばって勉強している。
I'm studying hard every day for the final exams.
マラソンの最後の5キロは本当にがんばらなければならない。
You really have to push yourself in the last 5 kilometers of a marathon.
試験のときはリラックスしてがんばってください。
Relax and do your best on the exam.
チーム全員でがんばれば目標を達成できる。
If the whole team works hard together, we can achieve the goal.
To insist on something or stick to one's opinion/position; to push one's point firmly (often used colloquially as '〜とがんばる').
彼は自分の案が一番だとがんばって主張した。
He insisted that his plan was the best.
先生に謝るよりも、彼は謝らないとがんばった。
Rather than apologizing to the teacher, he insisted on not apologizing.
意見が違っても、無理に相手を変えようとがんばってはいけない。
Even if opinions differ, you shouldn't forcefully try to change the other person.
To remain in a place or hold one's position; to stick to one's post or refuse to budge.
暴風雨の中でも店主は店を閉めずにがんばっている。
Even in the storm, the shop owner is hanging on and keeping the shop open.
敵の攻撃に対して兵士たちは最後までがんばった。
The soldiers held out against the enemy attack until the end.
寒さに負けず、子どもたちは外でがんばって遊んでいる。
Undeterred by the cold, the children are sticking it out and playing outside.