score:8
Short Answer
There doesn't seem to be any concrete evidence to support the idea that the Egyptians considered garlic to be a deity, and whether Pliny is actually saying this depends on how one interprets his text. There is no archaeological evidence and the only Egyptian source making any such claim is a late 3rd / early 4th century AD Coptic monk who may have had ulterior motives. However, along with onions, garlic was considered sacred in some regions at least and it was used in religious ceremonies.
Details
If garlic was a deity in ancient Egypt, it was certainly not a widely observed one but, given the enormous time span of ancient Egypt and the thousands of minor local deities, it is impossible to conclusively rule it out. However, neither E. A. Wallis Budge's two volume The Gods of the Egyptians, or, Studies in Egyptian Mythology (available on the Internet Archive) nor the much more recent (2003) The Complete Gods And Goddesses Of Ancient Egypt by Richard H. Wilkinson and Egyptian mythology : a guide to the gods, goddesses, and traditions of ancient Egypt by Geraldine Pinch (2004) make any mention of 'garlic' deities.
The closest reference to a 'garlic' deity (aside from Pliny and Juvenal) is a supposed 'onion' deity during the Graeco-Roman period in Pelusium on the Nile Delta, but there does not appear to be any archaeological evidence to support this. Further, as LangLangC has pointed out in a comment, Pliny's text could be interpreted as meaning that Egyptians saw garlic as having 'holy significance' rather than being a deity itself.
In his The Gods of the Egyptians, or, Studies in Egyptian Mythology, E. A. Wallis Budge makes no mention of garlic, but he does have this to say about onions:
In certain localities peculiar sanctity was attributed to the leek and onion, as Juvenal suggests, but neither vegetable was an object of worship in the country generally
Budge's reference to Juvenal relates to this passage:
How Egypt, mad with superstition grown, / Makes gods of monsters but too well is known. / 'Tis moral sin an Onion to devour, / Each clove of garlic hath a sacred power, / Religious nation sure, and best abodes, / When every garden is o'errun with gods!’
Having 'sacred power' is not the same as being a deity; garlic and onion were widely appreciated for their medicinal properties and also used in funerary rites and had great significance in other religious ceremonies. Further, both onions and garlic were closely associated Osiris, Bastet and Zeus Casius (among others) rather than being deities in themselves.
The only academic source which mentions the worship of an allium refers to the onion, not garlic (but there is also some confusion as to what the Egyptians termed 'garlic' – see also this source). Marie-Louise Buhl, in a 1947 article The Goddesses of the Egyptian Tree Cult, is more definite about onions being deities:
Other plants to which the Egyptians applied the epithet "sps" ("holy" or "sublime") were dill and onion. The latter was still worshiped as a god at Pelusium in the Christian Era.
The source for this is an earlier (1911) work cites a Coptic monk and martyr, Abba Pisura, active during the time of the emperor Diocletian (ruled until 305 AD), who mentions the worshipping of trees, leeks and onions. How reliable is Pisura? On the one hand, he was based in Egypt and thus probably had a much better local knowledge than foreign observers. On the other hand, he could be seen as having a vested interest in disparaging rival religions through ridicule.
Buhl and her source are contradicted by a later article (1973), Garlic-Growing and Agricultural Specialization in Graeco-Roman Egypt by Dorothy Crawford who asserts that
Pliny … preserves the strange conclusion of foreign observers that Egyptians considered garlic and onions as gods.
Also, this Archaeological Institute of America article makes no mention of a garlic or onion deity, but notes a relationship with demons:
More research is also needed on Pelusiac religion, its curious onion taboo, and sacred architecture… St. Jerome and the second-century B.C. Greek philosopher and physician made disparaging remarks about Pelusiac priests of Kassios, who refused to eat onions and garlic, which were known to cause flatulence and thus were associated with demons.
It's thus not difficult to surmise from the following comprehensively-cited source that
Evidence on the position of alliums in ancient Egypt … is quite confusing. Archeological and literary evidence from Egypt reveals that garlic, onions, and leeks were cultivated; that they were popular foods; and that onions were important in the diet of ordinary folk. Observers report that garlic and onions were included in burials…
Yet certain ancient Greek or Roman writers have said, with respect to Egypt, that, when taking an oath, people swear by garlic and onions as deities; that some Egyptians refuse altogether to eat onions; that priests in Egypt detest onions and are careful to avoid them; that it is a sin for Egyptians to eat onions and leeks; or that for the people of Pelusium, east of the Nile Delta, the wild onion is a god, and they do not eat onions.
Source: Frederick J. Simoons, 'Plants of Life, Plants of Death'
Simoons goes on to state that
The conclusion seems inescapable that statements made by certain Greek or Roman writers were incorrect, and it seems likely that some Egyptians consumed alliums freely as food, whereas others refused to eat certain of them. In J. G. Griffiths's view, the differences in the Greek and Roman accounts likely derive from the contrasting views of neighboring communities in Egypt. The evidence is clear that the onion had a special ritual role in the eastern delta, and specifically in the cult of Zeus Casius.