식사 means the action of having a meal (and more rarely for the food itself). It is a more formal word than 밥 but is still widely used in daily life, usually used as a noun and as 식사하다 (have a meal, dine) when used as a verb. Note that 식사를 먹다 is not used. Because 사 means doing something, it doesn't sound right with 먹다.
밥 can mean both the meal itself (usually the traditional bowl of rice) or having a meal. 밥(을) 먹다 corresponds to 식사하다. 밥(을) 하다 means making a meal, not dining.
음식 corresponds to "food" in English. it can mean any kind of food, and is more general and not used much for a daily meal. For example, we never say 음식 먹으러 갑시다. "Let's go have something to eat" would always be 밥 먹으러 갑시다, 아침/점심/저녁 먹으러 갑시다, or 식사하러 갑시다.