Scotland built a 3-0 lead on goals by Kim Little in the 19th minute, Jenny Beattie in the 49th and Erin Cuthbert in the 69th, but Argentina became the first team at a Women's World Cup to get a point after trailing by three goals.
Milagros Menéndez scored on a counterattack in the 74th minute and Bonsegundo's long-range shot five minutes later hit the crossbar, bounced down and had enough backspin to go off the fingertips of goalkeeper Lee Alexander and across the line.
Sophie Howard had just entered the game when she slid into a leg of Aldana Cometti, who was streaking into the penalty area. After a lengthy video review, North Korean referee Ri Hyang-ok awarded the penalty kick. Alexander dived to stop the kick by Bonsegundo, who could not get the rebound in. But another video review showed Alexander came off her line before the kick.
Given the second chance, Bonsegundo kicked the ball to the right of the keeper, who dived left.
Scotland, which had been on the verge of winning a Women's World Cup match for the first time, could not muster a threat in the remaining stoppage time and finished last in Group D at with two losses and a draw.
Argentina finished with two points after opening with a 0-0 draw against Japan - its first World Cup point - and losing to England 1-0.
Four of the six third-place teams advance, and Brazil (six points) and China (four points) are assured of two of those spots. Nigeria finished third with three points.
Argentina would advance if both the Cameroon-New Zealand and Thailand-Chile matches on Thursday finish in draws. Argentina was eliminated in the group stage of its first two World Cup appearances.
More AP soccer: https://apnews.com/apf-Soccer and https://twitter.com/AP_Sports
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.