The Galilean moons of Jupiter are similar in size to Titan and are also protected by their parent planet's magnetic field. How come only Titan is able to maintain an atmosphere?
As in real estate, so in astronomy:
Location, Location, Location
Where an object forms in a system will significantly impact its makeup. For example, during the stage of planet(esimal) formation, due to the radiation of the (proto-)star, various chemicals and atoms will be expelled from the innermost areas, but may stay around long enough to be part of planet(esimal) formation further out. This is the basic reason that the inner (rocky) planets, gas giants, and ice giants (and beyond that, Kuiper belt and Oort cloud objects) show significant compositional variations between each other and even within their own categories.
Let's consider the impact of location on the Galilean moons of Jupiter. The first one to consider is where in the solar system did the moon(s) in question form? We're not 100% sure of the answer to this for any moon (even our own). But the current predominant theories hold that the Galilean moons formed from a disc of gas bound to Jupiter early during its formation.
Now when any astronomical body undergoes gravitational collapse, be it planet or star or whatever else, there must be a corresponding release of energy and heat. This means that planets are pretty hot in their early lives, and the bigger they are the hotter they are and the longer it takes them to radiate it away (a volume versus surface area scaling consequence). Jupiter, being the biggest and heaviest of the planets, also emitted the most radiation as a result of this process. So much so that nearby moons would be scoured of various chemicals and gases, depending on how far away they were. I bring this up in discussing the compositional variations among the Galilean moons in another answer. Io, being the closest of the Galilean moons, was scoured of most of its ices, while the more distant Galilean moons have abundant and spectacular ices. The magnetic field of Jupiter is even strong enough to strip Io of charged particles in its limited atmosphere, which are added via its vulcanism, and that ultimately results in sizeable radiation belts that substantially enhance Jupiter's magnetic field.
Titan is singularly unique, being the only (known) moon in the solar system to have a meaningful atmosphere. Titan also has an unusually large orbital eccentricity, and is the only large moon around Saturn (in contrast with the Galilean moons of Jupiter, all large and of roughly similar sizes). Moreover, the observations of the Cassini-Huygens probe suggest that Titan contains significant amounts of Oort cloud materials (its nitrogen in particular) that would not have been found in sufficient quantities in the Saturnian system at the time of Titan's expected formation.
The main theory for Titan's origins posits a similar disc accretion method as for the Galilean moons, and even that Saturn may have had a system of moons similar to the Galilean moons early on. Titan in this case is expected to have formed relatively further out. But then a series of large impacts disrupted the system in novel ways. Impacts and viscous torques of the accretion disc caused any (large) inner moons to fall into Saturn, while Titan survives thanks to its more distant starting point and accretes some of the material of the impactors (some of which may have formed other moons, like Iapetus). Some, perhaps all, of these impactors would be expected to have been Oort cloud objects, thus helping to explain the Cassini-Huygens data. As long as these impacts occur after Saturn has lost its capacity to scour away atmospheres, Titan's accretion of their material then grants it its atmosphere and curious composition.
Mass obviously has something to do with it. Only Ganymede and Calisto are comparable in size to Titan, and they must have had atmospheres at the time of their formation, 4.5 billion years ago. Your question therefore becomes: why did Titan hang on to an atmosphere while Ganymede and Calisto did not? Another factor is distance from the sun. Titan is much further away than the Galilean moons, therefore colder, which helps it retain an atmosphere. The most important factor of all is probably the composition of their respective primeval atmospheres.
The primeval atmospheres of Calisto and Ganymede were probably similar to those of Mars, Venus and Earth, largely CO2 with a small percentage of nitrogen, methane, ammonia and water vapour, as well as a dash of H2 and He4. They all had oceans of liquid water. Being much further from the sun than Earth, the CO2 and water vapour soon froze out, while the remainder was eventually lost into space, assisted by the solar wind. The same thing happened on Titan, but for some reason I am not able to explain, Titan had a much greater proportion of nitrogen in its atmosphere (currently 97 percent), and nitrogen does not freeze at the prevailing temperature of Titan. Another thing which is hard to explain is how Titan managed to hang on to so much methane. The low freezing point of methane which prevented it freezing out in the same way as CO2 and water vapour is only part of the answer.