After a nightmare goal conceded after just three minutes, hosts Spartans drew level shortly after half-time through Billy Paxton and then sealed victory 15 minutes from the end with a textbook near-post finish by David Morrison from a corner-kick.
After battling to gain a valuable three points, Spartans remain in the thick of a six-way battle for promotion to the top tier, with Musselburgh Windsor Colts, Craigroyston, Tynecastle Colts, Inch Colts A and Dunbar United Colts all very much in the hunt.
Whites' challenge went awry just seconds into their clash with Bonnyrigg, however, as Morrison played a firm backpass from 30 yards out. The ball tripped over the boot of goalkeeper Calum Paton and despite the No.1's chase, it trundled into the net via the post.
If any responsibility for the goal fell on Paton, the goalkeeper atoned for any misjudgement ten minutes later, producing a flying stop to deny Bonnyrigg's roving defender Euan Casey.
Crucially, the deficit remained at one by half-time, and Spartans had a clear, achievable target in their sights upon the restart.
Buoyed by a collective resurgence in their ranks, Whites equalised with their first attack of the second-half. James Holmes displayed superb vision to sweep the ball across field to Paxton, lurking in space just inside the penalty area. The striker needed little time to ponder his options, squeezing a placed shot into the bottom right-hand corner of Daniel Judge's net from 15 yards.
The influential Spartans midfielder Daniel McIvor found space in a similar shooting position moments later, but guided a tame shot from 18 yards into the arms of Judge. A second snapshot by McIvor went closer, but the ball landed in the side netting after being struck from the right-hand corner of the penalty area.
Blues goalie Judge was finally afforded the opportunity to display his talents on 56 minutes, having previously faced shots either wayward or unstoppable.
Whites attacker Dean Hickey was one-on-one with the goalkeeper but saw his strike blocked. Although Judge was still grounded when Paxton picked up the loose ball and lined up another strike at the Rose goal, the visiting No.1 recovered brilliantly to scramble across and tip the goalbound effort wide for a corner.
It was from the resultant flag-kick, though, that Spartans seized the advantage, the cross from the right finding defender Morrison at the near post, who blasted the ball into the roof of the net with a skilful execution.
After the match, the Bonnyrigg coach John Henderson admitted that although his side had led for much of the game, Spartans merited their three-point haul.
He said: "We were a bit unlucky, and we had a couple of chances in the first-half that we ought to have scored. They (Spartans] deserved to win, though, as they took their opportunities well."
Henderson's counterpart Terry Burns, of Spartans, praised the continued efforts of his players during something of an unsettled season for the team. "We try to play passing football at Spartans, and the kids are now at an age where they want to win," he said. "It's been a transitional season for us but a good year, and I'm very happy with the way it's gone."
Spartans Whites: Calum Paton, Louis McKinley, Harry Oliff, David Morrison, Innes Burns, James Holmes, Murray McLennan, Daniel McIvor, Ruairidh Stirling, Billy Paxton, Dean Hickey, Ross Grieve.
Bonnyrigg Rose Blues: Daniel Judge, Daniel Hepplewhite, Ross Henderson, Euan Casey, Gregor Burns, Andrew Ross, Ryan Back, Keiran Fairlie, Morgan Scotland, Stuart McKay, Jordon Pelosi, Calum Preston, Connor Brunton.
Referee: Alan McEwan.