The potion that grants temporary luck is Felix Felicis, also known as "Liquid Luck." This potion makes the drinker lucky for a period of time, during which everything they attempt will be successful.