To try everything possible or do every last thing possible in a final attempt.
To wager everything.
To try to come out ahead in a competition for something specific or put oneself in a more favourable position generally.
To try to get one's horse into a better position during a horse race.