In a preliminary report, Ecuador's National Risk and Emergency Management Service said that the explosion had left five dead and 17 injured and destroyed eight houses and two vehicles.
An investigation into the explosion has been launched and organized crime linked to drug trafficking was suspected to be behind the incident.
Ecuadoran President Guillermo Lasso declared a state of emergency for 30 days in Guayaquil following the explosion.
"The entire public force will be available for restoring control of the city. We will not allow organized crime to try to run the country," Lasso wrote on Twitter.
The motive for the attack has not yet been specified by police. According to preliminary reports, two people on a motorcycle threw a sack which is believed to contain explosives.
At a joint press conference, Ecuadoran Interior Minister Patricio Carrillo called the explosion an "act of terrorism" and said the explosives seemed to be home-made, ruling out that grenades were used in the attack.
According to Carrillo, three people were killed on the spot while the other two died in hospital.
The government offered a 10,000-dollar reward for information about this incident.