All three judges scored it 48-47 to Whittaker, who suffered a foot injury in the first round.
Whittaker dominated the last three rounds of the fight, pinning the Cuban to the floor in the final minute.
"I sustained an injury earlier in the camp and I thought it would be 100 percent by now," Whittaker said.
"A guy like Yoel Romero, he sees a weakness he'll capitalise on it every time he can.
"I'm surprised he didn't kick it more. It definitely impacted on my game.
"I was trying to establish a solid jab and it's hard when your leading leg is bummed."