When clients come to you to do a job they do it with the belief that you are the best person they can find for the job. Often if we are honest with ourselves we are not the best person for the whole job. With very few exceptions there is always someone better at user interface, e-commerce, social media...than you. Your job as the main contact point for your client is to provide the best possible solutions to their problems. Sometimes that best possible solution isn't you.
Over the years I have been working in the web, both in house and freelance, I have come across a few projects like that. Currently we are rebuilding our entire site at my fulltime job. I would love to do that but the reality is that I am a one man team. The site needs to be launched quickly and we have to rebuild the e-commerce as well. Realistically I can't do all of that and maintain our current content output.
With disappointment I advised by boss to outsource the building and configuration of the main chunk of the site while I would continue with the e-commerce rebuild. I readily admit that I wanted to do the whole project since a site of this size would look really good in my portfolio but it's never going to get done in the timeline.
Even as a freelancer I am only an intermediate PHP developer. When it comes to big intricate PHP scripting I call in others who are the best solutions for those problems. While I make less money (sometimes none if I just provide a referral) on that particular project I get happy clients that recognize that I give them the best advice for them, not for my pocketbook.
So come on web designers/developers, make the right decision for your clients. Just being good will have benefits in the long term with referrals and reputation.