I would think that there can be 2 correct answers to this question:
First possible answer: "Did you remember to lock the door?"
-> The person who is asking the question has no idea if the door is locked by the listener (person he/she is speaking to), and is merely seeking to confirm if the listener has locked it.
Second possible answer: "Did you remember locking the door?"
-> The person who is asking the question saw/ knew that the door was already locked, and he/she is trying to find out if it was the listener who has locked it.
Hope this helps! :)