I think that the idea of 13 being unlucky is probably much older than the New Testament, and widespread later among people who had never even heard of it. We'll probably never know why that particular number is considered unlucky, but we do know that the idea is sufficiently widespread that Tolkien must have felt his young readers would not need an explanation; it's a handy cultural shorthand for "we need one more to make the numbers right."
In fairy tales (and The Hobbit is, in so many ways, an extended fairy tale) the numbers 3, 7, and 12 frequently come up. 3 or 7 is obviously too small a number for a party that plans to take on a dragon (plus, as others have said, 7 dwarves were already taken). It has occurred to me that Tolkien may have briefly intended there to be 12 dwarves, and then thought no if they are twelve in the beginning they would be wary of adding a 13th when what is needed is a reason for them to accept Bilbo despite their various reservations about him. By adding a 13th dwarf (although that is still the magic 12 plus Thorin their leader), he would have their excuse for bringing in an outsider, and 13 is really not a more unwieldy cast of characters than 12.
In fairy tales (and The Hobbit is, in so many ways, an extended fairy tale) the numbers 3, 7, and 12 frequently come up. 3 or 7 is obviously too small a number for a party that plans to take on a dragon (plus, as others have said, 7 dwarves were already taken). It has occurred to me that Tolkien may have briefly intended there to be 12 dwarves, and then thought no if they are twelve in the beginning they would be wary of adding a 13th when what is needed is a reason for them to accept Bilbo despite their various reservations about him. By adding a 13th dwarf (although that is still the magic 12 plus Thorin their leader), he would have their excuse for bringing in an outsider, and 13 is really not a more unwieldy cast of characters than 12.