Just had my HSG last month. Honestly, for me it was pain free. I took advice I'd heard and took 3 advil before I went.
Basically, they insert a speculum, paint your cervix with iodine (cold but not painful) and insert a small tube into your cervical opening. I found positioning on the table kind of awkward, and the machine over you. I only felt pressure as they inserted the fluid. Then it was over, she told me my tubes were open. There's a bit of discharge/cleanup afterwards.
I know that some women experience a lot more pain and cramping, but my tubes were open and I didn't feel any pain, the doctor indicated that that was why it didn't hurt.