It's not really a simple 1:1 comp.
Gilmore has been on the injury report 7 times for an ankle, most recently just two weeks ago. The ankle (+ concussion) caused him to miss 3 weeks, so Bouye has played almost 25% more snaps than Gilmore this season.
Then there are the differences in scheme and role.
How much man, zone and man/zone-mix do the Jags play compared to the Pats? A lot of fans were eager to have Jason McCourty signed by the Pats without thinking about the fact that he's played in mostly zone-based schemes his entire career, including college. Devin infamously floundered around for more than a year trying to learn man-coverage, and eventually transitioned to safety (though he's much, much better in man coverage now - six years later). So, how long might it have taken Jason to adapt to the Pats' schemes?
How much does Bouye stick to one boundary and whoever is lined up to his side? ... as opposed to sometimes shadowing a specific player for a game or a half, regardless where the guy lines up?
I'm not saying that Bouye hasn't been very good this season and looks vastly superior on the stat sheet, nor am I ignoring Gilmore's struggles. But still, Bouye has almost certainly had more opportunities ...
In any case, BB & Caserio certainly had a bit more tape on Gilmore than on Bouye (66 games/64 starts v. 50 games/19 starts), plus the advantage of having played against Gilmore 10 times over five seasons. Apparently, they concluded that Gilmore would be a better fit for the schemes that the Pats deploy.