Dumbledore left Harry the Resurrection Stone (disguised in a Snitch) in his will, and Harry uses it just before he goes to battle Voldemort. However, he doesn't use it to try to bring the dead back for an extended period or anything.
Does the Resurrection Stone keep Harry alive?
Harry is able to "defeat" death another way: After fighting with Voldemort in the forest and being killed by the dark Wizard, Harry doesn't really die, but he is resurrected truly as himself, and not a shadow of who he was previously.
How did the resurrection stone bring Harry back to life?
The truth is Harry never actually died. His mother's protection lived on in Voldemort's blood after he incorporated it in the potion which brought him back to his physical body. This is why Harry got to heaven, but since he could choose to stay alive he managed to come back to the real world.