While we can't rule out an influence from Lewis, he was not Gaiman's primary motivation. Gaiman has named different influences for Stardust.
Stardust has a much closer parallel to the 1926 book Lud-In-The-Mist by Hope Mirrlees. Gaiman has praised the book, including it in a list of his all-time favourite novels. In this newspaper feature, he makes clear that Lud-in-the-Mist was an influence of Stardust and names some other inspirations too.
I started writing Stardust in 1994, but mentally timeslipped about 70
years to do it. The mid-1920s seemed like a time when people enjoyed
writing those sorts of things, before there were fantasy shelves in
the bookshops, before trilogies and books "in the great tradition of
The Lord of the Rings". This, on the other hand, would be in the
tradition of Lud-in-the-Mist and The King of Elfland's Daughter. All I
was certain of was that nobody had written books on computers back in
the 1920s, so I bought a large book of unlined pages, the first
fountain pen I had owned since my schooldays and a copy of Katharine
Briggs' Dictionary of Fairies. I filled the pen and began.
One could even argue that Lewis fits within 'the great tradition of Lord of the Rings' that Gaiman was seeking to escape. Lewis was of course contemporary with Tolkien and both were members of Oxford University literary club The Inklings. One might suggest this places them as working within the same literary tradition, although the two produced stylistically different fantasy epics for different reasons.
Of the works mentioned by Gaiman as inspirations, Stardust has a particular parallel with Lud-in-the-Mist. The two books share a close story arc: a mundane town bordering on fairyland, a place of which the common folk are afraid. Up until one character plucks up the courage to visit.
There are also tonal and stylistic associations between the two. Critics have noted that Stardust sounds quite unlike Gaiman's normally somewhat frenetic writing and is more of a hark back to classic English Victoriana.