China raised retail gasoline and diesel prices on Thursday by up to 18 percent, a move that threatens to stoke domestic angst over decade-high inflation less than two months before Beijing hosts Olympics games.