It was an evenly-matched affair with both players struggling through shaky spells, but the Canadian edged it 6-4 2-6 6-2.
There was little to separate the pair in the first set until Berdych struck the net to hand his opponent a break for 5-4, allowing him go on and clinch it.
The Czech raised his game in the second, and looked the stronger of the two. Raonic double-faulted while 5-2 down to make it one set apiece.
It was Raonic who turned up the heat in the decider. He broke early to go 2-1 up and again to make it 5-2 before holding his nerve and seizing victory with a powerful serve.
Raonic will take on Stan Wawrinka in the quarter-final of the competition.