Dos Santos came on after the break and opened the scoring in the 63rd minute before converting a penalty in injury time at the City of Coventry Stadium.
The win puts Mexico top of Group B with four points, while Gabon has one.
"We are now psychologically strong," said Mexico coach Luis Fernando Tena. "We know we are almost there but we need to beat Switzerland in the next game to make it to the next round so we need to push hard the whole game."
Reflecting on the win, Tena added: "We knew we had to work hard. We needed to find spaces."
Switzerland faced South Korea later Sunday in the second group game of the day.
Mexico was held to a disappointing scoreless draw by South Korea in their opening game, but dominated their African opponents on Sunday.
Their first real chance came in the seventh minute when Marco Fabian forced a low save from Gabon keeper Didier Ovono with a stinging shot.
Hector Herrera had his long-range effort stopped by Ovono in the 32nd and Oribe Peralta headed wide from a free kick just before halftime.
Gabon tried to counterattack but was unable to get past the organized Mexican back line during the first half.
Tena brought on Dos Santos for Miguel Ponce after the break, and the Tottenham striker gave his team the lead with a curling shot past Ovono after a clever backheel from Peralta put him through on goal.
Gabon pressed for an equalizer and was almost rewarded in the 70th when Mexico goalkeeper Jose Corona had to dive low to his right to save an effort from Pierre Aubemayang.
However, Henri Ndong was sent off in injury time for fouling Peralta in the box, and Dos Santos netted the resulting penalty to put the game beyond doubt.
Gabon coach Claude Mbourounot blamed his team's defensive frailty for the defeat.
"Today there were costly errors that proved decisive but I think offensively we were very good and we had quite a few chances to score," he said.
"If we were more fluid in the final half we could have come away with something from the game."Suggest a correction