Usually yes — gabapentin and ibuprofen work in different ways and are often taken together, but the FDA and NIH list ibuprofen as a possible (minor) interaction, ibuprofen carries its own stomach, bleeding and kidney risks, and you should confirm with your pharmacist before combining them.
Gabapentin (used for nerve pain and epilepsy) and ibuprofen (a nonsteroidal anti-inflammatory, NSAID) act through different mechanisms, so they are commonly used together without a known dangerous reaction. MedlinePlus (NIH) does list NSAIDs "such as ibuprofen (Advil, Motrin) and naproxen (Aleve)" among nonprescription products that may interact with gabapentin, but the only interaction the FDA/DailyMed Neurontin label actually documents is small and pharmacokinetic — coadministering an NSAID (naproxen) appeared to increase gabapentin absorption by about 12–15% (and the label notes this was at subtherapeutic doses, so the effect at normal doses is unknown), which is generally not clinically dramatic. The bigger reasons for caution are that ibuprofen has its own risks (stomach irritation, GI bleeding, kidney strain, raised blood pressure) independent of gabapentin. Note also that for nerve pain specifically, ordinary NSAIDs like ibuprofen often provide limited relief, which is one reason gabapentin is prescribed in the first place — ask your pharmacist whether a different add-on (for example acetaminophen/paracetamol) would suit your situation.
Use the lowest effective ibuprofen dose for the shortest time and do not exceed the label limit (OTC: typically no more than 1,200 mg/day unless a doctor directs otherwise). Take ibuprofen with food, and watch for stomach pain, black/tarry stools, vomiting blood, swelling, or reduced urination — stop and seek care if these occur. Gabapentin's main effects are drowsiness and dizziness (on the FDA label, dizziness affected about 28% and somnolence about 21% of postherpetic neuralgia patients), so be careful with driving or machinery, especially when starting; ibuprofen itself isn't sedating, but the FDA label warns about combining gabapentin with other sedating drugs and alcohol. Be extra cautious or ask your doctor first if you have a history of ulcers or GI bleeding, kidney disease, heart failure, high blood pressure, are on blood thinners, steroids, or other NSAIDs, are pregnant (avoid NSAIDs in the third trimester), or are over 65. If you're taking gabapentin for nerve pain, ask your pharmacist whether acetaminophen would be a better add-on. Always confirm the combination with your pharmacist or doctor for your specific situation.
This is general reference, not medical advice, and not a guarantee of safety. Interactions depend on your doses, health conditions, and other medicines. Always confirm with your pharmacist or doctor before combining products, and follow the dosing on each label.