Like Chirple said, the gills are external, no portion is internalized. The opening is characteristic of all larval caudates.
The opening is partially used to create a current through the external gills, but mainly to allow for the "vaccuum" method of eating, which is also very widespread among fish. This opening closes during metamorphosis.
The eficacy of external gills is inferior to internal gills which greatly help maximize oxygen absortion.
It works on caudates, because they have suplemental oxygen absortion systems. All caudates have permeable skins that allow for oxygen exchange, specially in the tissues of their mouth. Most adult caudates, also have lungs.
Some "primitive" fish also have external gills in their juvenile forms, which works because they also have lungs.