Here's one method. Currently (to use curling as an example), after pool play the top four teams go to the medal round, seeded 1-2-3-4. 1 plays 4, 2 plays 3; the winners play for the gold, the losers for the bronze, and the loser of the final gets the silver.
To make a system where you have to win your last game to take a medal of any color, you'd have to start with the gold medal game, pitting 1 versus 2. (Only 1 or 2 could possibly win gold.) The winner gets gold; the loser plays 3 for the silver. The winner of that game gets silver; the loser plays 4 for the bronze.
There are obvious problem with this, starting with the anticlimactic nature, whereby there are two matches after what should be the final, gold medal game. There isn't any method I can think of that avoids this flaw.