An early goal from Bongani Ndulula was cancelled out by Siyabonga Nhlapo before Bester scored a late winner with virtually the last touch of the ball.
It was the perfect start for the home side as Ndulula gave them the lead after only four minutes.
The Buccaneers striker concluded a swift passing movement with a clinical finish from six-yards out to give Pirates the early ascendancy, 1-0.
Shell-shocked by the home side’s blistering start, Cosmos struggled to get hold of the ball early on and could only watch as Pirates stroked the ball around the park with confidence and precision.
In the 24th minute Cosmos’ hard-work paid off as they found a superb equaliser through the boot of Siyabonga Nhlapo.
The Cosmos man picked up the ball in space 30-yards out from goal and unleashed a thunderbolt which found the top left-hand corner of the goal, 1-1.
After surrendering their lead, Pirates picked up the pace of the game and began dictating the flow once more.
Still, they struggled to break down a resolute Cosmos defence and had to resort to shooting from long range.
The closest the Buccaneers came, however, to scoring a second in the first-half came a minute before the halftime break when Thabo Matlaba brought the best out of Avril Phali.
Matlaba let loose from 25-yards out, but Phali was quick to react making a good save to deny the Pirates man.
The second 45 minute continued where the first left off and Oupa Manyisa was the first to try his luck form distance, but much like his compatriots his 30-yard shot in the 66th minute sailed over the crossbar.
Six minutes later and Thulasizwe Mbuyane should have given Pirates the lead for the second time, but he squandered his chance heading over from close range after meeting a right-wing cross.
The Buccaneers captain squandered another golden opportunity to take the lead in the 80th minute when Lucky Lekgwathi fired wide from six-yards out after latching onto the end of a good passing movement.
Pirates continued to throw men forward and it looked like they were destined to share the spoils with Cosmos, but a late, late strike from substitute Rudolph Bester, from 25-yards out, found the top right-hand corner of the net, 2-1.
The result takes the Buccaneers to the summit of the League, at least until Black Leopards host Mamelodi Sundowns on Wednesday night.
For Cosmos, they remain rooted to the bottom of the table.