More than 30 firefighters rushed to a two-storey property in Thomas Grant Avenue, off Weevil Lane, after the call at about 6pm.
Smoke and flames were seen rising from the building when they arrived.
Hampshire Fire and Rescue said seven people had been treated by paramedics at the scene for smoke inhalation,
A woman, 33, was taken to Queen Alexandra Hospital in Portsmouth. Three other patients were treated at Gosport War Memorial Hospital for minor injuries.
Firefighters from Gosport, Cosham, Portchester, Southsea and Fareham were among those dealing with the blaze in the ground-floor flat.
Neighbouring flats were evacuated as firefighters worked with the electricity and gas board to isolate the supply to the building.
The crews used breathing apparatus, hose reels, jets and tactical ventilation fans to extinguish the fire before dampening down.
Members of the public were asked to avoid the area until it was made safe.
A SGN spokesperson said: ‘We were called to Thomas Grant Avenue in Gosport last night at the request of the emergency services, as we are the local provider of the national gas emergency service.
‘We supported the emergency services by turning off the gas supply to the affected property and carrying out safety checks.’