And why would she refuse, if it was customary to do so? It seems odd that she would think of it as "gross" if it was a commonly accepted practice.
Mary specifically used the phrase "pocky priest" which implied she was worried the Archbishop had some disease, perhaps even a venereal disease, and she was worried about contagion (George Pollock, "Infection on the Move", 2012). So that would be the suggested motive. Wallace Shugg in "Prostitution in Shakespeare's London" (1977) connects this anecdote to a larger trend of British protestants connecting Catholic clergy with "the French Pox"; syphilis.
It does appear to be true, or at least it is treated as credible. As well as Pollock and Shugg, it is mentioned by John Matusiak in "James I: Scotland's King of England" (2015) and George Donaldson's "Mary, Queen of Scots" (1974). Shugg and his source C Creighton's "A History of Epidemics in Britain" (1891) suggest this was written by James himself in later recollections, but I cannot find the source, "Works of James I"; by an unidentified author and no specified date. If someone knows what source this is and has access to it, confirmation of which specific text the story came from would be appreciated. The page for the specific line is 301 if that helps. I also wonder if there are any specifically contemporary accounts as I haven't seen any sign of them yet. Any time the origin of the story is specified it is James and all references to it in general seem to use the wording from James account. Side-note; Matusiak describes as smearing saliva on the mouth rather than spitting in it, which does add slightly to the murkiness of determining the truth here.
It is worth noting that James' account of Mary refusing is biased, because he ties the spittle into the larger issue that he disliked his originally Catholic Baptism and saw it as part of the problems with his childhood. He described it, according to Simon Schama's "A History of Britain: The British Wars, 1603-1776" (2003) as "a filthy apish trick". The designation "apish" may, I'm speculating here, even be a variant spelling of "Papish" (i.e Catholic) given the non-standardised spelling of the time and James' use of a heavy Scottish accent in his spelling. Feel free to correct me on that anyone. In any case, following the anti-clerical use of syphilis as a potential influence, it would make sense for James to describe this custom as something unpleasant, and it makes him and mother look cleaner from it if she rejected it and he was not subjected to it. James had a complicated and perhaps somewhat ambivalent relationship with his mother, he did after all hardly know her given her exile, but he did generally protect her reputation if only for a more abstract principle of honour (that's a whole 'nother debate).
Will Coster in "Baptism and Spiritual Kinship in Early Modern England", (2002, 2016 edition) describes what may be the custom referenced in the anecdote, and sounds like Matusiak's version of the story. As the last part of the "threshold ceremony", itself the part of the baptism before the "ceremony at the font", the priest anoints the child with his saliva on their ears and nose (let's hope they washed their hands before spitting on them and rubbing them on a child, eh?). Interestingly, the "exorcism" part of the "threshold ceremony" was not used in Protestant Europe, including after 1552 England. The problem appears to be its connection to Catholic views on original sin, as well as its general aggressive symbolic-ness with the saliva section of the exorcism referencing Christ healing the deaf. This certainly fits with James having Protestant motives if the custom is specifically associated with Catholics (perhaps goes towards my theory around the reference to "apish" being papish?). This particular part of the ceremony is also mentioned by J. Scott in "The Baptists in Scotland: An Historical Survey" (1927) described in classically anti-Catholic terms that would fit in with the time period here, but usefully confirming that this practise was definitely used in Scotland. Scott's wording implies it was added sometime later after the baptism tradition had already been established in recognisable form, but he doesn't give any date or go into many specifics.
If Mary did indeed reject it, it makes sense it was because of the "pocky priest" and her and Archbishop Hamilton's Catholicism would explain why it was originally planned, despite Scotland by then having started its reformation. One could even argue the theory, wildly speculative but possible, that Mary didn't want to include this custom in the baptism because it was rejected by Protestants and she wanted to moderate what was already seen as a controversial Catholic baptism? She did, after all try to compromise with the "Lords of the Congregation" who had taken over the country in her absence.