Arriving at St. Paul's Cathedral in the late afternoon is not something I'd recommend. The steps to the Stone Gallery get closed earlier than the church itself.
My kids and I maintained a breakneck pace up the 378 steps for a view of London - totally worth it. Then it was a more leisurely descent to the Whispering Gallery inside the Cathedral.