Yet another tough question...I'm on a roll!
Even though Sam and Gibby do seem to have some chemistry, I strongly believe that Sam would be happier with Freddie, and here's why:
First, let's look at Sibby. If you look at it from a normal viewer's perspective, you'll see that Sam and Gibby are a lot alike in the sense that not many people want to date them, and they are more or less unpopular, or viewed by their peers in a negative/weirded out way. From this point of view, one could easily conclude that Sam and Gibby are perfect for eachother, because they could easily pair up and have eachother's backs. However, what do they think of eachother? That's the thing. They see eachother the same way that the rest of their peers do. Sam thinks that Gibby is creepy, and has expressed this on numerous occasions. And Gibby is obviously somewhat scared of Sam, and finds her to be a little too abrasive, at times. This DOES NOT mean that Gibby doesn't want to date her, as he has shown some attraction to her, in the past. But, when it comes right down to it, Gibby is way too intimidated by Sam to really, truly approach and date her. And since Sam has shown little to no attraction to Gibby, in general, I doubt that she's be truly happy with him.
Now, let's take a look at Seddie. As we all know, Sam and Freddie have a complicated relationship. It has it's tense, awkward patches, and it is nowhere near perfect. However, and I'm sure you're sick of hearing this by now, Sam and Freddie care about eachother. Freddie doesn't seem to mind that she's ignored/rejected by other guys, at school, and overall, he accepts her for who she is. Even though Sam tries hard not to reveal it, she does have a vulnerable side. She does care what others think of her, as shown in episodes like iSpeed Date, iReunite With Missy and iMake Sam Girlier. Freddie knows exactly how to handle her vulnerable side, and is gentle, but also firm, when he needs to be. Sam has even shown that she trusts Freddie with her problems, as shown in iReunite With Missy. And let's face it, the idea of Carly and Freddie getting together has always been hard for Sam to swallow. Did you see the look on her face when she walked in on the slow-dance???? Now, correct me if I'm wrong, but she looked very confused and hurt. They didn't even notice her walk in. To quote Carly in iBeat The Heat: "Isn't that sad???" Not to mention she was rejected by Gibby in the very same episode. She looked even more confused when Carly told her that she and Freddie kissed. She tried to pass it off the next day like it was no big deal and she even joked about it. But we all knew it had to have been a big deal for her, because she felt the need to tell Freddie what was going on.
I could go on and on, but you see my point. Bottom line, I think that Sam would be happier with Freddie because they understand, trust, and care about eachother, but what do YOU think???????