Relegation-threatened Latics looked on course for three much-needed Premier League points as they clung onto a 21st-minute lead given to them by an excellent Charles N’Zogbia strike at the DW Stadium.
However, after Ali Al Habsi saved one Mikel Arteta spot-kick, Wigan’s luck ran out as Baines struck from 12 yards on 77 minutes after a Hugo Rodallega handball.
Wigan finished strongly but Everton goalkeeper Tim Howard was outstanding in the closing minutes.
Wigan dictated the pace for most of the game and threatened in the second minute as Rodallega put James McCarthy through on goal, but Howard beat him to the ball.
Rodallega had a sight of goal moments later as he raced onto a Ben Watson pass, but the Colombian shot wide under pressure from Sylvain Distin.
Everton looked most threatening early on when Baines, sold for £6million to the Toffees four years ago, and a fit-again Arteta linked on the left.
Leon Osman also whipped in a good cross for Victor Anichebe, who controlled well with his back to goal but was unable to turn.
Yet Wigan were the more adventurous and fully deserved to go ahead. Their breakthrough came after McCarthy picked out N’Zogbia in the area with a delicate chip over the defence.
The Frenchman’s control initially let him down and he then stumbled as Howard challenged, but he recovered quickly and turned to curl the ball home from a tight angle.
Despite the goal being just reward for their endeavours, Wigan perhaps began to show their anxiety as they quickly started to sit back.
Everton almost grabbed an immediate equaliser through Osman but Al Habsi palmed over a fierce shot.
Wigan invited more pressure and survived a scare when a dangerous Baines free-kick was headed behind by Maynor Figueroa for a corner.
Everton were handed a glorious chance to equalise in the 35th minute when N’Zogbia was caught out by a short Baines free-kick and tripped Osman in the corner of the area.
Despite Baines having scored the Toffees’ last two penalties, Arteta took responsibility and was denied as Al Habsi saved superbly to his left.
It was a moment that re-energised the home crowd but Wigan suffered a blow shortly before the break as Mohamed Diame was forced off injured. Scotland midfielder James McArthur took his place.
N’Zogbia had a chance to add a second on the stroke of half-time when a cross dropped to him after beating Rodallega, but Howard parried his powerful drive.
Everton controlled possession in the early stages of the second half and Wigan encountered more problems when N’Zogbia limped off with a hamstring injury after 53 minutes and was replaced by Victor Moses.
Moses immediately took on N’Zogbia’s creative mantle and brought two good saves out of Howard within minutes of coming on.
His first effort came after he showed persistence when Everton closed him out on the edge of the area.
The 20-year-old calmly moved away from goal and fed Emmerson Boyce, whose cross was blocked by Phil Jagielka.
Moses followed up on the rebound but Howard turned the ball away for a corner from point-blank range.
The American then palmed over another well-struck shot from Moses from just inside the area.
Wigan had a moment of alarm when Al Habsi spilled an Osman shot but the on-loan Bolton goalkeeper quickly gathered at the second attempt.
Everton tried to freshen up their side by sending on Seamus Coleman and Beckford for Arteta and Tim Cahill.
Moses wreaked more havoc when he beat Baines and cut inside Jack Rodwell to shoot but his effort was blocked.
McCarthy seized on the loose ball but was also frustrated as desperate Everton defenders twice got in the way of his shots from the edge of the area.
But Wigan were punished for another error as Rodallega needlessly handled at a corner and referee Lee Mason pointed to the spot for a second time.
This time Baines ensured there was no let-off as he blasted the ball into the roof of the net.
Wigan upped the tempo in a late effort to reclaim the lead and Everton had Howard to thank for keeping them at bay.
He saved twice from Rodallega, beat away a Watson drive and clutched an acrobatic effort from Franco di Santo.
Moses also had a chance after a goalmouth scramble in injury time but fired well over.