The tradition of the Pearly Gates at the entrance to Heaven has its origin in the Book of Revelations, which describes twelve sets of gates into the City of God, one for each of the twelve tribes of Israel. We are told that 'the twelve gates were twelve pearls: every several gate was of one pearl'. In Revelations, each gate is attended by an angel; the idea of St. Peter standing in judgement over those hoping to get in has its origins elsewhere, in the Gospel of Matthew, in which Peter is told: 'I will give to thee the keys of the kingdom of Heaven.'
A huge number of jokes are set at the Pearly Gates, many of them tasteless; a number of these can be found under the heading (fill in name) dies and goes to Heaven. Many more are collected at http://188.8.131.52/heaven.htm for anyone interested.
The Pearly Gates also turn up in quite a few songs: In 'You'll Never Go To Heaven' ('I Ain't A-Gonna Grieve My Lord No More'), we are informed that you'll never go to Heaven in roller skates, 'cause you'll roll right past those Pearly Gates. In 'The Great American Railway', the protagonist informs us that in eighteen hundred and eighty-eight he picked the lock of the pearly gates, he picked the lock of the pearly gates with a crowbar from the railway. In Country Joe & the Fish's 'I-Feel-Like-I'm-Fixin'-To-Die Rag' it's five, six seven, open up the Pearly Gates! Well, there ain't no time to wonder why - Whoopee! We're all gonna die!
A quick search on www.mudcat.org (which as far as I know houses the Web's biggest collection of folk songs) turns up five others mentioning pearly gates, but I don't know them so I'll stop there.