At the end of Harry Potter And The Philosopher's Stone/Harry Potter And The Sorcerer's Stone, Dumbledore reveals it'd been him who'd sent Harry the Cloak. It used to belong to James, Dumbledore had borrowed it before the Potters died and then Dumbledore returned it to Harry.