Which of the sentences is correct?
Most people can be made happy by being given what they need.
Most people can be made happy by giving what they need.
My guess is they are all correct. As for the understood subject, in the first sentence, being given take most people as its subject.; In the second sentence, the understood subject of "giving" is generic.
Edit: further question.
Can I interpret the second sentence as: People can be made happy by (others) giving (to them) what they need.