Mexico is enscured of at least matching its previous best Olympic finish of fourth at its home games 44 years ago, and it will come back to Wembley on Tuesday looking to secure its first football medal with a victory against Japan in the semifinals.
Dos Santos said it was a typically hard-fought Mexican victory.
"It's all about confidence," Dos Santos said. "It was really important that at 2-2 we never gave up, that we kept running and fighting until that third goal. We worked hard for this win and now we're on our way to a medal."
Senegal captain Abdoulaye Ba then tried to head the ball back to Mane, only for substitute Raul Jimenez to run onto the ball and force the 'keeper into a save, with substitute Hector Herrera heading the rebound into the empty goal.
While Konate is the tournament's leading scorer with five goals, the African team's defensive blunders ultimately cost it a chance to go even further in its first Olympics.
"There were a few individual errors and maybe that cost us the match but we have to remember these are young players," Senegal assistant coach Aliou Cisse said. "Brave or not, we still lost."
Mexico had started stronger with Dos Santos leading the attack, whipping a wicked free kick into the area for Jorge Enriquez to guide over the defensive wall beyond Mane.
El Tri then sat back and Senegal would have equalized if not for goalkeeper Jose Corona, who dove to swat away Konate's goal-bound header in the 25th.
Corona made another point-blank save just five minutes before Dos Santos sent a low ball into the middle of the area, which Mane eventually spilled into the path of Aquino to blast into the roof of goal.
But Konate continued his impressive London Games with another key goal, as the 19-year-old Maccabi Tel-Aviv striker rose unmarked at the far post to guide Souare's high cross under Corona, who conceded a goal for the first time in four games.
"I had a the chance to score five goals, and now I'll do my best to keep my adventures going," said Konate, who scored three of his goals at Wembley. "To make the quarterfinals in our first appearance at the games is amazing and to score five goals is extraordinary."
Balde, who came on moments before Mexico's second goal, ran into the area to power Souare's cross home for the equalizer as the Mexicans were troubled by their physical opponents' aerial game.
"That goal gave me a fright," Mexico coach Luis Fernando Tena said. "(But) I liked the players competitive spirit. After they tied it at 2-2, we played better."
Mexico nearly won it in stoppage time but Peralta headed Dos Santos' cross just over the crossbar before the 23-year-old former Barcelona player secured what proved to be the eventual winner.