And what "background" is that exactly? 
I'd always take gifts to a dinner party (decent bottles - note the plural - of wine plus flowers).
I'd always take a gift if meeting a friend for a birthday.
Visiting a newborn, no. The baby isn't going to care or appreciate anything you bring.
For a very close friend I'd have bought something in advance - asking what they needed to prepare for the new arrival.
Truth is new babies need very little. Their mother, nappies, sudocream and babygro's. That's it.
Parents will have already acquired items like prams/cots/FF paraphernalia if required.
I did not expect or want "presents" from my friends in those early weeks. Goodness knows I had enough baby stuff in the house without having more I didn't ask for.
Their time on the other hand was golden.
A catch up and chat. Being me and not just a mother to a newborn.
An opportunity to get a quick shower to myself while they had a 15 min cuddle.
Getting a cup of tea made for me and getting to drink it in peace because they were happy holding a Velcro baby and I could enjoy a hot drink rather than cold water.
Offering to pop a load of baby clothes washing in the machine whilst I was feeding newborn.
Presents are not always material.
I think people forget that.