I agree that this wasn't well-explained, so, the explanation I'm about to offer is merely an educated guess, but...
I think what they were trying to imply is that 'Me' was somehow in cahoots with the Time Lords in order to trap the Doctor like she did. After all, did they ever explain why exactly she wanted to trap him like that at the end of Face the Raven? I don't think they did -- because when Me was starting to explain about everything thus far being a trap (I've given up on trying to remember her Viking name), she didn't really have time to finish before everyone sort of got distracted by that whole bit about Clara sealing her own fate like she did. And after that whole thing was over, Me's demeanor was certainly different about what she did to the Doctor, not as confident. She almost seemed sorry about what she did (well, definitely sorry about what happened to Clara, as she explicitly stated), but, yeah, it sort of seemed like she didn't really want to imprison the Doctor after all that -- like she was doing it because she had to for some reason. Perhaps there was some sort of deal in place.
And it sort of makes sense because, well, why would Me even want to do that to the Doctor in the first place? The arrangement they seemed to have agreed on last time they met was that the Doctor would save people, and Me would save the people who suffered in the aftermath of the Doctor's actions. And I'm pretty sure they even emphasized that this does not make them enemies. (You could argue that she forgot, but she seems to be pretty good about writing down the important things.) Point is, she never had any reason to remove the Doctor from the picture like that. And if she did, she would've done it a long time ago, I feel like.
And the Time Lords? Ohhhhh they would have plenty of reason to want to lock the Doctor away. I realize this is something that's a lot easier to pick up for viewers of the Classic series, but, as I've explained before, the Time Lords fucking hate the Doctor. And after all their failed attempts at permanently executing him, it makes sense that they'd settle for just imprisoning him for virtually eternity. Hell, as far as the Time Lords are concerned, the Doctor's the reason why they're trapped (and they've already tried crossing over into the 'normal' universe and reaching out to the Doctor, as we've seen in The End of Time* and The Time of the Doctor, respectively). The Doctor never "saved" them as far as they're concerned. Hell, the only thing the Doctor even saved them from was himself, as he decided not to simply kill them all. To us, this comes across as the Doctor "saving" Gallifrey, because we'd previously believed that the Doctor destroyed Gallifrey, therefore meaning that the events of that episode re-wrote that event. But, when you look at it from a non-linear, non-subjective viewpoint... Gallifrey was never destroyed in the first place. They were never "saved" -- just sealed away against their will. If the Doctor had done nothing -- and not destroyed nor sealed away Gallifrey -- then the Time War would've simply raged on. But, no, the Doctor sealed them away and cut them off from the rest of the universe, sooo... yeah, Time Lords are pissed. Like they didn't have a million reasons to hate the Doctor to begin with.
*In case you were unaware, the events of End of Time (from the Time Lords' perspectives) take place at the same time as the events in Day of the Doctor. In both episodes, we see the same meeting room of high-ranking Time Lords -- in The End of Time, we see them desperately using the Master as a way of ensuring a link between Gallifrey and the rest of the universe. In Day of the Doctor, we see what fate exactly they're so desperate to escape at that same moment. :P
ALSO, there's the whole fact that he seemed to have sort of been trapped inside that fancy gadget that serves as his will (and how did Me know how to use Gallifreyan technology? How would she have even known that the Doctor owned such a thing??), and the fact that he was on Gallifrey once he broke free -- and, well... yeah. Me couldn't have teleported the Doctor inside a piece of Gallifreyan technology (which was somehow connected to Gallifrey itself) on her own. There's something else going on, here.
...It wasn't until I finished typing all this out that I came to the obvious conclusion that Missy has to have something to do with this. I can't believe I hadn't considered it sooner.
I mean, speaking of The End of Time, we saw the Master get sealed away with the rest of Gallifrey -- and then never got any answer as to how it was even possible for her to come back as Missy, especially given the fact that, after Day of the Doctor, we know that the Master was trapped along with the rest of Gallifrey in a pocket universe which really shouldn't have been so easy to get out of.
Maybe we'll finally get an answer as to what happened there...