I envisioned this method of maintaining breathable oxygen. So each ship would have these gardens generating oxygen like the plants on Earth do. How plausible is this and how would it likely work?
Remember the fundamental rule of rocket design: Every Gram Counts.
The main functions of a CELSS are:
1 Turn astronaut's exhaled carbon dioxide into oxygen
2 Turn astronaut poop and table scraps into food
3 Turn astronaut pee and washing wastewater into drinkable water
The current lines of research focus on doing this the same way Terra's ecosystem does: by using plants. In order to make the CELSS hyper-efficient they have to use hyper-efficient plants. Which explains the focus on algae.
The advantage of algae is that it can theoretically form a closed ecological cycle. This means that 6 liters of algae water, one human, some equipment, and sunlight can keep the human supplied with food and oxygen forever.
But there is waaayyyy more to this subject than the snippets I included. Please read that site for the details.
Which is better: Closed or Open Loop System?
Later on the page this resource indicates that closed-loop systems only make sense when you need environmental systems to last for a year or more. For times less than this, it takes less mass to just carry the inputs with you and dump the waste overboard.
A garden in space?
You could replace some or all of the algae with other plants, but your closed cycle ecological system will take more space, require more resources, and possess a very much higher mass.
Similarly you could increase the mass of algae in the system and raise animals which ate it for nice variety in the diet (likely sea creatures able to share the algae tanks - crab, shrimp, fish, etc.). But as with replacing algae with trees, adding animal life decreases the mass efficiency of the system.
For near-term (the next couple of hundred years) or possibly forever, space travel will require something less mass intensive to make space flight practical.
The Biosphere 2 experiment was designed, in part, to answer this question (the term "Biosphere 1" being reserved for the planet Earth). It consisted of 3.14 acres of completely-enclosed, air-tight, land (including rainforest, wetlands, savannah, and desert), as well 8 individuals and a number of animals (including goats, chickens, and wild boar). Ultimately, the land was not able to sustain the necessary oxygen levels, which steadily dropped and eventually had to be artificially boosted. However, at least part of this oxygen loss was later found to be due to exposed cement portions of the structure absorbing oxygen from to air.
Another atmospheric issue that was encountered was fluctuating CO2. It would drop during the daylight hours due to photosynthesis, and then rise again during the night. Occasionally, a CO2-scrubber had to be used.
A later, second experiment (that included sealing the cement) was terminated prematurely due to some combination of personal, managerial, and financial issues.
"A single mature tree can absorb carbon dioxide at a rate of 48 lbs./year and release enough oxygen back into the atmosphere to support 2 human beings"
- Arguments for Land Conservation: Documentation and Information Sources for Land Resources Protection
That being said, it becomes a matter of elementary math. Number of people / 2 = number of trees.
However, the $O_2:CO_2$ ratio will be in constant flux, unless you keep lights on continuously. Also, you will have to water the trees. I would probably be easier to use a machine to produce oxygen.