The TVTropes Trope Finder is where you can come to ask questions like "Do we have this one?" and "What's the trope about...?" Trying to rediscover a long lost show or other medium but need a little help? Head to Media Finder and try your luck there. Want to propose a new trope? You should be over at You Know, That Thing Where.
I believe that's called a Deus Ex Machina
@whoffle I think it is in the same group but Deus Ex Machina is specifically unearned. I am talking about when it is set up before to not just come out of nowhere, but just before
It can be a Deus ex Machina if it really is invented as a solution at the last minute. I'm not sure that applies to the Harry Potter example.
You mention "we knew some hints about them" — that's Foreshadowing.
You also mention "right before the rising action" — that's The Reveal.
- "the audience is given new information which had been withheld to create suspense. The Reveal changes the nature of the plot, often pushing it from suspense towards action."
Assuming JK Rowling was at least planning the concept of horcruxes and hallows even though she never named them until late, it's not really a deus ex.
When we get new information that is crucial to the plot right before the rising action or climax. Best example I can think of is how Harry Potter never hears the words "horcrux" or "hallow" until the final two books of the whole series. We knew some hints about them but they were not outlined in exposition until they became relevant.