France advanced to a quarterfinal against Nigeria, which beat England 1-0 earlier Wednesday.
The victory came despite Ecuador having the better of general play. Just a minute before Griezmann's goal, Ecuador's Juan Cazares shot just wide of the far post at the other end.
Griezmann tapped the ball home after Ecuador keeper John Jaramillo made the initial save but failed to control the rebound.
Ecuador had more chances in the first half. The best came in the 45th minute when Marlon De Jesus outraced a defender down the right side and into the area. As De Jesus turned and paused to shoot, France goalkeeper Jonathan Ligali smothered the ball before the South American could react.
Ecuador also hit a post and Ligali made a diving save on Edson Montano in the half.
France's best early chance came when keeper Jaramillo tipped Griezmann's free kick over the bar.
In the 48th minute, Jaramillo made a diving save on Cedric Bakambu, and a few minutes later France's Alexandre Lacazette missed a wide-open goal from just a few meters after a cross from Griezmann.
Ecuador began to come on when Marcos Caicedo slashed a shot in front of the goal in the 55th, and the South Americans were getting most of the opportunities until Griezmann broke through.