In the exmaple you give, can I assume that the problem is timing? Ie you may play the right notes etc but finish before/ after the point where the next section of solo kicks in ?
Other people have mentioned using a metronome to get your timing steady - that's really good advice. If you play with one, and timing is the problem, then at first it'll feel like the metronoems is wrong because you're so used to rushing or dragging certain sections. Getting used to playing with a metronome will fix this, and it lasts too- try again months later and maybe the old habits have come back a bit but most likely you'll find you're still a lot better at timing that previously.
A metronome will help a lot in ironing out rushed or slurred notes, but there;s still the skill of playing along with a backing track. For me, the trick was not to listen to what I'm playing but listen to the sound as a whole: Listen to the combined sound of the backing track and your guitar as if you were listening to the song on the radio or someting, and hear where your guitar fits in. This will help with a few things:
1) Mix: listening like this helps a lot of people get their volume right because, for example, it might be that previously you weren't loud enough or were drowning out the drums etc.
2) Remembering where you are: Some tunes can get repetetive and listening to a drum fill or a lick on the bass or something can give you a clue when things are about to change.
3) Timing: If you're focusing on the track as a whole, you're going to hear the parts you need to keep time with so you can use them to gauge whether you've rushed ahead or dragged a little.
If the problem is literally missing notes or not recognising where you are etc, then maybe it's related to how well you can hear yourself ? Make sure you can hear both what you're playing and the backing track clearly. Sometimes it helps to have the track coming out of one speaker and your guitar from another, eg your amp I guess. The separation meakes it easier to decipher in your head.