You can do both halves of this on their own. Lo vedo domani is a sentence you have said many times, and so is gli parlo domani, and neither one costs you a thought. Then both pronouns have to be in one sentence together and out comes gli lo do, with the two words left side by side as they are, or lo ti do, in the order English would have used them. The pair is not two pronouns standing next to each other. It is one small piece of machinery, and it does three things on the way.
The first is the order. The indirect pronoun, the person, goes in front of the direct one, the thing: me lo, te la, glielo. English puts them the other way round (“give it to me”), so this order has to be built rather than recognised.
The second is the vowel. Mi, ti, ci, vi and the reflexive si become me, te, ce, ve, se as soon as one of lo, la, li, le, ne follows. Nothing about the meaning changes. The i simply does not survive in front of another pronoun, so mi dai il libro becomes me lo dai.
The third is glie. Gli, to him, and le, to her, both come out as glie in front of lo, la, li, le and ne, and glie is written joined to whatever follows it: glielo, gliela, glieli, gliele, gliene. The same glie also does the work of “to them”, so glielo do does not say on its own which of the three people you mean, and the sentence around it does. Italian also has lo do loro, which keeps the person at the end instead.
Me lo dai?
Te la presento domani.
Gliel’ho detto ieri.
Ce ne sono tre.
Non gliene ho parlato.
In every one of those lines the person is settled before the thing is named, and one of them is not a person at all: the ce of ce ne sono tre is the ci that means “there”, and it changes its vowel in front of ne like any other. So the first slot belongs to the indirect pronoun, and ci takes it whichever job it is doing.
Two of those sentences also show what a following vowel does to the pair. Glielo in front of ho loses its own o and is written gliel’ho, while gliene has no o to lose and stays whole. The same elision is open to the others: me l’ha detto, te l’ho portato. The full form is not wrong either, and the two vowels run together in speech whether or not the apostrophe gets written.
The edge that trips people up
Everything above puts the pair in front of the verb, which is where it goes in an ordinary sentence. When the verb is an infinitive, an imperative or a gerund, the pair moves to the end of it and is written as part of the word: voglio dirtelo, portamelo, dandoglielo. One word, one stress, no space.
Voglio dirtelo, ma non adesso.
With a modal verb you get a choice of position and no change of meaning: te lo voglio dire and voglio dirtelo are the same sentence. The polite imperative goes the other way and keeps the pair in front (me lo dica), and with a negative command both positions exist: non dirmelo and non me lo dire.
Then the connection back to the participle. With avere, a direct object pronoun in front of the verb pulls the ending of the participle onto itself, which is the rule set out in the post on ho mangiato against ho mangiata. Inside the pair, the direct pronoun is the second half, so it is the la or the li that decides: gliel’ho data when the thing is feminine, glieli ho dati when there are several.
Gliel’ho data ieri.
How to hear it
Building the pair in two steps is easier than recalling it as a finished form. Who first, then what, and the front word takes its other shape as soon as the second one is there. In front of another pronoun the word is me, not mi, and te, not ti: there is no sentence in which mi lo is the sequence you want, so the two steps are me and then lo.
Gli plus lo is the one where the two steps disappear completely. Glielo is one word in the writing and one word in the mouth, so if you are still assembling it while you say it, it is worth saying the whole form a few times until it arrives finished.
The spelling is the one piece of help here. Glielo, gliela, glieli, gliele, gliene are written as single words, and that is a reminder on the page that they are single items to learn, rather than glie plus something you attach at the moment of speaking.