They were close enough that they could have been thought of independently, just because Kirkman was probably writing it for a while before the first issue was published.
28 Days later came out in the UK in November of 2002.
The first issue of The Walking Dead was published in October 2003.
So, roughly a year's difference, which isn't much in the grand scheme of things, given how print cycles work and how long it takes to get something on the shelf after it is accepted to be published.
It is also entirely possible that it was an homage to 28 Days Later, or to something earlier like The Day of the Triffids, which I believe is what 28 Days Later was paying homage to with that scene.