Matching "customer" expectations is a multi-parametric unsolvable problem with no closed-form analytical solution, for many reasons, of which one should be enough (as it makes all the difference in the world). Customers (i.e. users) usually have no idea of what they want.
Joel Spolsky practically hits this nail on its head pretty hard:
If there’s one thing every junior consultant needs to have injected into their head with a heavy duty 2500 RPM DeWalt Drill, it’s this: Customers Don’t Know What They Want. Stop Expecting Customers to Know What They Want. It’s just never going to happen. Get over it.
As Joel carries on to explain, when you go to an expert designer (of anything, e.g. an architect, but just as much a software engineer), you go to them because they know better. So you have to work your way around this first of all.
The point is that you have to try to provide some alternatives, dig somewhat deep into the customer's problem and try to "understand" their needs, feel them and try to apply the best of your knowledge to meet their needs. Customers sometimes make an important mistake, they put their expectations over their needs. They don't do that mistake on purpose, but you need to keep that in mind. The reason for that is, somewhat obviously, that expectations are primarily shaped based on past experience and can be (and usually is) very subjective, but needs are usually objective and stem from real-world problems, the pragmatic difficulty of which is almost always hard to argue against.
You have to be your customer's "ally" down the interaction road. Unfortunately, this includes, more often than not, you explaining to your customer what they need. So you have to get into your customers' "world", understand their needs and actively shape their expectations into a result that helps them achieve what they want.
Beyond this "philosophical" chatter, the only useful advice you can get is that you have to spend quality time with your client. Ask, ask, and ask again. Gather all the details, prepare a few reasonably chosen alternatives, demonstrate the pros and cons of each and communicate them clearly to your client.