頑張って (Ganbatte )
is a somewhat polite and softer way of asking/telling someone to do their best or to not give up. It can probably be used with just about anyone, so long as they are not very superior to you. To be even more polite, you would add the word "kudasai" after "ganbatte." ,
頑張ってください "ganbatte kudasai" can safely be used even with very senior people.
頑張れ (Ganbare )
means basically the same thing as "ganbatte," but is more of a command. It is the imperative form of "ganbaru," and thus is less polite and "harder" sounding. I don't think that you would want to use this form with someone who is very senior to you. On the other hand, because it is somewhat "forceful," it is often used to help motivate an equal or a subordinate who is struggling in some way.
頑張ろう (Ganbarou ) - 頑張りましょう (Ganbarimashou )
is another common form of 頑張る"ganbaru." The meaning of this is a little different than that of "ganbatte" and "ganbare," in that those two are directed at others, while "ganbaro" is also aimed at yourself. That is, "ganbaro" is a form that means something like "Let's do our best!" or "Let's all hang tough!"