Who bears responsibility when an aircraft takes off from the wrong runway?
It depends. There could be any number of reasons for such a mistake, and it is rarely the mistake of any one single person.

Within aviation, we don't really talk about responsibility the way you seem to imply in your question. In many other industries, when a mistake happens, an investigation  is initiated with the purpose of finding and punishing the responsible party. In aviation, it is believed that no one makes mistakes on purpose; if a plane takes off from a wrong runway, no one meant for it to happen.

So accident and incident investigation in aviation does not focus on finding someone responsible. Instead, the investigation focuses on figuring out how a similar incident/accident can be prevented in the future. That is why ICAO Annex 13 says:


  The sole objective of the investigation of an accident or incident shall be the prevention of accidents and incidents. It is not the purpose of this activity to apportion blame or liability


If someone takes off from another runway than intended, the investigators will not just look at who made the mistake, but rather why the mistake was made. There could be any number of reasons for this. Very often, there are hidden latent threats somewhere in the system.

Maybe the lights at the airport were not sufficient, maybe the signs guiding the aircraft to the runway were misleading, maybe the taxiway layout is confusing, maybe the ground radar was inoperative when it should have been working, maybe the airline had scheduled the crew in a way that imposes fatigue in the cockpit, maybe the procedures are insufficient - I could go on.

The point here is, these potential causes are all things that can be changed in order to prevent the same incident from happening again. You can put up better signs or repair the ground radar, etc. Whereas, if you simple decide that the pilot or controller is to blame and then fire them, without removing the latent threats, then it's more than likely that another pilot or controller will make the same mistake in the future. What are you going to do then - fire them as well?

The whole idea is, instead of focusing on punishing people for their mistakes, if you try to understand what caused them to make those mistakes, you will not only learn much more, but you will also encourage people to report more incidents, that may not otherwise have been reported. We call this Just Culture, and it is all part of the reasons why aviation remains to be one of the safest ways you can possibly travel.