Who is better after this queen sacrifice line? I was checking Hikaru vs Caruana's round 6 game, these are the first moves:

[Event "London Chess Classic 2016"]
[Site "London"]
[Date "2016.12.15"]
[Round "6.3"]
[White "Caruana, Fabiano"]
[Black "Nakamura, Hikaru"]
[Result "1-0"]
[BlackElo "2779"]
[WhiteElo "2823"]
[LiveChessVersion "1.4.8"]
[ECO "B96"]
[FEN ""]

1. e4 c5 {[%clk 1:59:50]} 2. Nf3 {[%clk 1:59:52]} d6
{[%clk 1:59:45]} 3. d4 {[%clk 1:59:48]} cxd4 {[%clk 1:59:39]} 4. Nxd4
{[%clk 1:59:44]} Nf6 {[%clk 1:59:24]} 5. Nc3 {[%clk 1:59:39]} a6 {[%clk 1:59:19]}
6. Bg5 {[%clk 1:59:26]} e6 {[%clk 1:59:01]} 7. f4 {[%clk 1:59:15]} h6
{[%clk 1:58:56]} 8. Bh4 {[%clk 1:59:08]} Qb6 {[%clk 1:58:40]} 9. a3
{[%clk 1:58:15]} Be7 {[%clk 1:57:01]} 10. Bf2 {[%clk 1:57:06]} Qc7
{[%clk 1:56:55]} 11. Qf3 {[%clk 1:56:14]} Nbd7 {[%clk 1:55:27]} 12. O-O-O
{[%clk 1:55:28]} b5 {[%clk 1:55:14]} 13. g4


So I came up with the following variation:

13. ... O-O 14. g5 hxg5 15. fxg5 Ne5 16. gxf6 Nxf3 17. fxe7 Qxe7 18. Nxf3


Who is better after the queen sacrifice?
How did you come up with this line?

Castling kingside on move 13 right into the attack, looks like suicide for black to me. 

Also I don't see the point of white sacrificing the queen. Instead of giving black the dream square on e5, I'd first play h4 and only then g5, so that you can recapture on g5 with the h pawn.

Regarding your position at the end of your variation, it is probably just equal. Black does not have any particular weaknesses and also there does not seem to be any immediate threat of an attack on the black king anymore. Compare this with the queen sacrifice Caruana played in the game where he had only 2 pieces for the queen, but complete dominance on the light squares.