The hosts had taken an early lead when Tom Cleverley drove in a low shot.
But Everton's defensive frailties resurfaced within seconds when Marc Pugh equalised for the Cherries.
Baines struck from the left of the box to seal a first league win in nine matches for the Toffees but some home fans protested against Martinez.
Relive Everton's win here
Follow all the reaction to Saturday's football here
The winless streak in the league, coupled with last weekend's FA Cup semi-final defeat by Manchester United, had stirred significant discontent amongst Everton fans about their Spanish boss.
The ex-Wigan manager had said he was "ready to fight more than ever" in the build-up to the match, a week after a last-minute loss at Wembley that itself followed a 4-0 humbling by Liverpool.
A banner saying "Time to go Roberto" was flown over the ground during the match, and a number of anti-Martinez banners were seen inside Goodison Park.
Cleverley's goal from the edge of the penalty area and Bournemouth's swift equaliser showed the good and bad of Everton's approach.
The build-up to and the execution of the former Manchester United midfielder's effort showed the kind of neat, attractive football that Martinez is known to encourage.
But within seconds the game was all square, Callum Wilson shaking Premier League debutant Matthew Pennington off the ball before putting in a cross that the home defence failed to deal with, allowing Pugh to strike.
The positivity of the early lead quickly evaporated, but it wasn't until near half-time that a few murmurings of discontent were heard around a subdued Goodison.
The home team were on the front foot from early in the second half, but after reclaiming the lead they were given several nervous moments by a spirited Bournemouth.
Substitute Benik Afobe missed a header from close range, and Wilson claimed a penalty after a clash with John Stones.
It didn't feel like an Everton performance to answer the doubters.
Media playback is not supported on this device
For Bournemouth it was a third consecutive defeat and a result that left them them nine points and four places above the relegation zone with two games to go.
The Cherries can look back on their first season in the top flight with some pride, but despite playing attractively at times at Goodison, this was a fifth loss in their last six outings.
Only Newcastle and Aston Villa have conceded more than the 63 that Eddie Howe's side have let in, and the Bournemouth manager will rue how Everton were allowed to reclaim the lead.
Aaron Lennon's cross bobbled all the way across Bournemouth's box before it was emphatically converted by Baines.
Media playback is not supported on this device
Margaret Aspinall, chair of the Hillsborough Family Support Group, and Jenni Hicks were among several relatives of victims of the 1989 disaster who were presented to the crowd just before kick-off with Mrs Aspinall embracing Martinez on the touchline.
The campaigners were given a long ovation by the crowd at the end of an emotional week for the city of Liverpool after an inquest concluded that the 96 fans who died had been unlawfully killed.
Everton boss Roberto Martinez: "The win was very important - it has been an emotional time. We had to win. We had to dig deep, we showed we're a team and that we have character.
On Everton fans protesting about his reign: "In football you have to concentrate on affecting the game and just winning. The winning feeling allows you to move on. That's what we can take from today.
"Those aspects (fans organising banners to be flown over Goodison) are not for me. My concentration is preparing the players and preparing for the game."
Media playback is not supported on this device
Bournemouth manager Eddie Howe: "I think we were worth a draw, the two goals we conceded were out of context.
"We were solid and our keeper was a spectator for most of the game. When chances came we weren't clinical enough."
Everton visit Leicester next Saturday (17:30 BST), which could be a title-winning celebration for the Foxes, while Bournemouth host West Brom (15:00 BST).
Match ends, Everton 2, Bournemouth 1.
Second Half ends, Everton 2, Bournemouth 1.
John Stones (Everton) wins a free kick in the defensive half.
Foul by Lewis Grabban (Bournemouth).
Corner,  Bournemouth. Conceded by Matthew Pennington.
Corner,  Bournemouth. Conceded by Leighton Baines.
Attempt missed. Matt Ritchie (Bournemouth) left footed shot from outside the box is close, but misses to the right. Assisted by Benik Afobe.
Substitution, Everton. Kieran Dowell replaces Ross Barkley.
Attempt blocked. Junior Stanislas (Bournemouth) right footed shot from outside the box is blocked. Assisted by Charlie Daniels.
Hand ball by James McCarthy (Everton).
Substitution, Bournemouth. Lewis Grabban replaces Callum Wilson.
Attempt missed. Benik Afobe (Bournemouth) header from the centre of the box is just a bit too high. Assisted by Callum Wilson with a cross.
Attempt missed. Junior Stanislas (Bournemouth) right footed shot from the left side of the box is high and wide to the right. Assisted by Andrew Surman.
Offside, Bournemouth. Matt Ritchie tries a through ball, but Simon Francis is caught offside.
Corner,  Bournemouth. Conceded by Darron Gibson.
Attempt missed. Tom Cleverley (Everton) right footed shot from outside the box misses to the right. Assisted by Ross Barkley.
Attempt blocked. Matt Ritchie (Bournemouth) left footed shot from outside the box is blocked. Assisted by Benik Afobe.
Attempt blocked. Junior Stanislas (Bournemouth) right footed shot from the left side of the box is blocked.
Attempt blocked. Benik Afobe (Bournemouth) left footed shot from the centre of the box is blocked. Assisted by Simon Francis with a cross.
Offside, Everton. Leighton Baines tries a through ball, but Romelu Lukaku is caught offside.
Substitution, Bournemouth. Benik Afobe replaces Joshua King.
Substitution, Bournemouth. Junior Stanislas replaces Marc Pugh.
Attempt saved. Tony Hibbert (Everton) right footed shot from the right side of the box is saved in the centre of the goal. Assisted by Ross Barkley.
Attempt saved. Aaron Lennon (Everton) right footed shot from outside the box is saved in the centre of the goal. Assisted by Darron Gibson.
Goal!  Everton 2, Bournemouth 1. Leighton Baines (Everton) left footed shot from the centre of the box to the top left corner. Assisted by Tom Cleverley.
Attempt saved. Matt Ritchie (Bournemouth) left footed shot from outside the box is saved in the bottom right corner.
Darron Gibson (Everton) is shown the yellow card for a bad foul.
Foul by Darron Gibson (Everton).
Matt Ritchie (Bournemouth) wins a free kick in the attacking half.
Substitution, Everton. Romelu Lukaku replaces Oumar Niasse.
Attempt missed. Callum Wilson (Bournemouth) right footed shot from the right side of the box is close, but misses to the right. Assisted by Simon Francis.
Attempt missed. Joshua King (Bournemouth) right footed shot from outside the box is close, but misses to the left. Assisted by Callum Wilson.
Attempt blocked. Ross Barkley (Everton) right footed shot from outside the box is blocked. Assisted by Leighton Baines.
Delay over. They are ready to continue.
Delay in match Steve Cook (Bournemouth) because of an injury.
Corner,  Everton. Conceded by Simon Francis.
Oumar Niasse (Everton) wins a free kick in the attacking half.
Foul by Matt Ritchie (Bournemouth).
Attempt missed. Joshua King (Bournemouth) right footed shot from the right side of the box misses to the right. Assisted by Callum Wilson with a headed pass.
Tom Cleverley (Everton) wins a free kick in the defensive half.
Leighton Baines got the winner against Bournemouth to end Everton's poor recent run and ease the pressure on manager Roberto Martinez.