It appeared Barrow would drop points at home for the first time this season but referee Shaun Hudson awarded a soft penalty for Carl Piergianni's shoulder-to-shoulder battle with Cook.
United keeper Joel Dixon had made a number of excellent saves during the first half, but the Pilgrims hit the post through Dayle Southwell and the crossbar through Jamie McGhee.
United, missing Zak Mills through illness, got off to a flying start and Southwell's header came back off the post after Scott Garner had nodded back Greg Tempest's deep corner.
Marc Newsham then rolled the ball wide from 12 yards after McGhee had done brilliantly to cross from left.
Barrow gradually found their feet and were denied by a string of excellent Dixon saves. The on-loan Sunderland stopper thwarted Jason Walker, Johnny Gorman, Dan Pilkington and Paddy Lacey as the home bombardment mounted.
Walker also slammed an effort wide, while Dixon made a terrific stop to keep out Cook on the stroke of half-time, moments after McGhee had ghosted in to head narrowly wide from Tempest's cross from the left.
United dominated the chances after the break with McGhee skipping away to cross from the left but Southwell missed his kick in front of goal.
McGhee's 25-yard bullet then rattled off the bar with keeper Tony McMillan beaten, Southwell's drive deflected wide off Andrew Burns and Liam Marrs did brilliantly to reach Mark Jones' crossfield pass and centre for Kyle Dixon to drill off target from 20 yards.
Barrow cranked things up in the closing stages and Joel Dixon took no chances with a Gorman free-kick which was tipped over, while James Ellison's header flew a fraction wide following Izak Reid's corner before Reid himself rattled the post.
The game's defining moment unfolded on 90 minutes when referee Hudson inexplicably awarded Barrow a spot-kick and COOK powerfully blasted the ball home.
Barrow (4-4-2): Tony McMillan; Andrew Burns, Danny Livesey, Simon Grand, Andy McWilliams; Johnny Gorman (James Ellison 78), Alex-Ray Harvey, Paddy Lacey, Dan Pilkington (Izak Reid 67); Andy Cook, Jason Walker (Sam Sheridan 85). Subs (not used): Niall Cowperthwaite, Liam Willis.
Boston (4-4-2): Joel Dixon; Liam Marrs, Scott Garner, Carl Piergianni, Rene Steer; Kaine Felix, Kyle Dixon, Greg Tempest, Jamie McGhee (Michael Hollingsworth 82); Dayle Southwell (Zeph Thomas 85), Marc Newsham (Mark Jones 58). Subs (not used): Conor Marshall, Sam Vince (gk).
Referee: Shaun Hudson.
Attendance: 1,413 (80 visitors).
PIC: Eric Brown.