The difference between ‘ir’ and ‘irse’ is a matter of perspective. When we use irse, we emphasize the fact that we leave the place where we are. Instead, this notion is absent in the sentences formed with ir. We are going to see all this step by step.
The verb ir expresses displacement towards some point:
(1) Voy a Berlín.
In (1) it is necessary to interpret that someone moves from the place where they are to the city of Berlin.
The point to which we move may be understood, as in (2), but your idea will be there anyway. Take a look at this little dialogue, which could happen in any home:
(2) —Necesitamos aceite para la cena. —Voy yo.
In (2) the destination of the trip is not specified, but for those present it is easy to interpret that it is the supermarket or any other place where they have a habit of getting oil. If there is no place where we are going, the sentence with go is meaningless.
Instead, with irse the main idea is to leave the place where one is. Therefore, a teenage son can calmly say this to his parents:
(3) Me voy. No me esperéis a cenar.
The speaker who makes a statement like (3) is focusing attention on the fact that he is leaving where he is, not where he is going. It can be a convenient way for the child to announce his departure without having to explain where his steps are leading.
Even so, irse allows us to express the place to which we are going, for example:
(4) Me voy a clase.
Example (4) must be interpreted like this: I am leaving (the place where I am) to go to class.
Of course, irse also allows us to specify the place we leave. If a teenager tells you this, you better worry:
(5) Me voy de casa.
In contrast, the verb ir does not support this complement:
(6) Voy de casa.
Example (6) is not acceptable because, as we said before, the sentences with ir only make sense if there is a destination point. If we add it, the order is restored:
(7) Voy de casa al trabajo.
However, the meaning of (7) is very different from that of (5). Voy de casa al trabajo simply indicates a commute. I’m at home and I’m commuting to work. Instead, irse de casa is leaving home.
As irse expresses the idea of leaving a place, we can contrast it with verbs that have the meaning of staying in the same place:
(8) ¿Te vas o te quedas?
That same question would be absurd with ir:
(9) ¿Vas o te quedas?
This is so because the verb ir is opposed to venir (and not quedarse):
(10) ¿Vas o vienes?
In short, the difference between ‘ir’ and ‘irse’ is in perspective. Irse highlights the idea of leaving a place, while ir this idea is absent.