This occurs at the end of chapter 13 while playing as Grimlock.
You will have to protect Optimus Prime from falling below 50% health which you can see at the top of the screen. If he is not damaged for a period of time he will heal on his own. The enemies spawn from the left, front, and right simply take out enemies when they get too close and focus on the big guys mainly. Don't use the dinosaur mode as well as picking up and throwing enemies. Stick to melee and executing for health as needed.