Is it necessary to replace lead gas pipes?
I suspect you actually have two questions: 

1) Does it meet current code, and 

2) Do I have to do something about it. 

My understanding is that in most places you can't do anything new with lead gas pipe, BUT there's no obligation to upgrade old service as long as it's working OK.

My understanding is that most places won't even let you replace lead pipe with more lead pipe - if the pipe goes, you have to replace with something newer. But as long as the pipe is stable, you can leave it there for as long as you like.

Lead gas pipe is somewhat like solid asbestos shingles (which the house I grew up in had as siding) - as long as you don't disturb it, it isn't going to hurt anything, so don't disturb it unless you have to.