Be calm and do not lose your temper as someone who is calm is seen as being in control, centered and more respectable. When the person you are dealing with sees that you are calm despite whatever he/she is doing, you will start getting their attention.
• Try to understand the customer intentions.
I'd like to believe that no one is difficult for the sake of being difficult. Even when it may seem that the person is just out to get you, there is always some underlying reason that is motivating them to act this way. Rarely is this motivation apparent. Try to identify the person's trigger: What is making him/her act in this manner? What is stopping him/her from cooperating with you? How can you help to meet his/her needs and resolve the situation?
• Get some perspective from customer
In all likelihood, your colleagues, managers and friends must have experienced similar situations in some way or another. They will be able to see things from a different angle and offer a different take on the situation. Seek them out, share your story and listen to what they have to say. You might very well find some golden advice in amidst of the conversation.
• Let the customer know your intentions behind what you are doing. Sometimes, they are being resistant because they think that you are just being difficult with them. Letting them in on the reason behind your actions and the full background of what is happening will enable them to empathize with your situation. This lets them get them on-board much easier.
• Treat the customer with respect.
No one likes to be treated as if he/she is stupid/incapable/incompetent. If you are going to treat the person with disrespect, it's not going to be surprising if he/she treats you the same way as well. As the golden rule says, "Do unto others as you would have them do unto you."
• Escalate to a higher authority for resolution (hardly recommended).
When all else fails, escalate to your manager. This is considered the trump card and shouldn't be used unless you've completely exhausted your means. Sometimes, the only way to get someone moving is through the top-down approach, especially in bureaucratic organizations. Be careful not to exercise this option all the time as you wouldn't want your manager to think that you are incapable of handling your own problems.