There are lot of examples given in the HSPICE manual, I don't have the manual presently but I think this is the correct syntax:
.measure ac gain find v(node_for_gain) AT=1K
since you might be having a unity magnitude AC source for input ac voltage at any node will correspond to the gain upto that node. You can use an other name ofr your parameter than 'gain' which I used above.