"Did you get married?" is the question you want to ask if you want to find out if a person recently got married. Although "have you gotten (not got) married?" is grammatically correct, we don't say that; it comes across as very odd.
Sometimes, people will ask: "Have you gotten married yet?" if they expect you to already or eventually be married.
I hope my answer helped. Please let me know if you still have questions =)