The detonation was reported at addresses in Tanfields shortly after 6pm on Tuesday, Lancashire Fire and Rescue Service (LFRS) said.
Three casualties were taken to hospital, one of whom had suffered a minor head injury and the other two for precautionary check-ups.
Two other people who escaped from the flats did not go to hospital but were treated at the scene, again for minor wounds.
Wigan Pride 2022: 19 pictures as rainbows fill the streets and equality and diversity is celebrated
Man left with life-changing injuries after being hit by truck on busy Wigan high street
Keepmoat Homes granted planning permission for new Wigan housing development
Helicopter chases loose dogs after vicious attack on Wigan man
Wigan borough house evacuated after car smashes into front of it
Incident commander Tom Cookson said the explosion had caused a significant amount damage to a ground floor and first-floor flat which had impacted on the building’s structure.
Four of the casualties were said to have escaped from the first-floor flat and one person from the ground floor home.
Mr Cookson said the blast had not damaged neighbouring properties but a number of their residents had been evacuated as a precaution.
Up to 10 people were unable to return to their flats as investigations continued into the structrual damage the explosion had caused.
Mr Cookson said: "At this time we do not know what the cause is, it is currently being investigated.”
It was confirmed that Electricity North West, Cadent Gas and the fire service's own investigators were all looking into the possible causes of the incident.
Four fire engines attended the blast: two from Skelmersdale, and one each from Ormskirk and Bamber Bridge.
West Lancashire Council staff were called to the scene to support residents who were not immediately allowed back into their homes.