Adding new lights to a switch
It sounds like the switch is at the end of the electrical run; the white wire that's connected to the black wires is carrying current to the switch, then the black wire coming back from the switch is connected to the light:



You need to connect the black wire for the new outlet to the black wire going to the light, not the cluster of other black wires; all the neutrals and grounds should be OK as they are.

While you've got the electrical box open, does the white wire connected to the black wires have black electrical tape wrapped around it?  If not, it should; this will indicate that it can carry live.