Actually, as much a fan I am of the M3, I would say in terms of sheer performance, the GT-R completely outclasses it. I wouldn't even describe it as "close".
Road & Track just did a big comparo test which included the GT-R and M3. The GT-R, which came in 3rd behind the Gallardo LP560-4, Viper SRT10 ACR and 911 GT2 showed some consistently
excellent lap times, running well in line with the top dogs.
http://www.roadandtrack.com/article.asp?section_id=31&article_id=6944
On the big track at Willow, it was 5.69 seconds (91.23) ahead of the M (96.92). That's a
beatdown. To put that into perspective, that's
more than three times the spread between the M3 and the last place Evo X MR (98.37).
Of course, you could say the M3 did surprisingly well considering it's heft and multi-purpose mission. It did beat the track-dedicated Exige S 240, no mean feat.
Anyway, I think only a (purely theoretical) M6 CSL would have a shot at the GT-R. Of course, I just read an interview in which the top brass at BMW M says they've already killed the M3 CSL program.
M