J.K. Rowling has long been a fan of family trees, and for the redesign of her Pottermore site, she's debuted a new essay that delves into the Potter family's ancestry. First, we learn that the boy who lived's surname was supposed to be Potterer, but over time it became Potter, a name so Muggle-sounding that it's part of the reason the Potter family was left off the elite Sacred Twenty-Eight list of pure-blood families. The name dates all the way back to the 12th century, with Linfred of Stinchcombe, an "eccentric" wizard whose magical cures for the common cold and broken bones paved the way for the Skele-gro and Pepperup potions now taught at Hogwarts. And that's where Harry Potter (and the generations of Potters before him) got all that gold from. Mystery solved!
As for how the Potter family came to own the invisibility cloak gifted to Harry, that's all thanks to Linfred's eldest son, Hardwin, who married Ignotus Peverell's granddaughter. Rowling writes: "In the absence of male heirs, she, the eldest of her generation, had inherited her grandfather’s invisibility cloak. It was, Iolanthe explained to Hardwin, a tradition in her family that the possession of this cloak remained a secret, and her new husband respected her wishes. From this time on, the cloak was handed down to the eldest in each new generation." When James Potter's parents, Fleamont and Euphemia, both died of Dragon pox "within days of each other," he inherited the cloak that was eventually passed on to Harry.